|
@@ -60,7 +60,7 @@ class Demo extends Api
|
|
|
public function task_bill($total_amount,$back_rate,$user_id,$shop_id,$table_name)
|
|
|
{
|
|
|
|
|
|
- $amount = bcdiv(bcmul($total_amount,$back_rate,2),100,2);
|
|
|
+ $amount = bcdiv(bcmul($total_amount,$back_rate,4),100,2);
|
|
|
|
|
|
|
|
|
|
|
@@ -70,7 +70,7 @@ class Demo extends Api
|
|
|
|
|
|
|
|
|
$shangwu_rate = config('site.back_shangwu');
|
|
|
- $shangwu_amount = bcdiv(bcmul($amount,$shangwu_rate,2),100,2);
|
|
|
+ $shangwu_amount = bcdiv(bcmul($amount,$shangwu_rate,4),100,2);
|
|
|
|
|
|
$shop_info = (new \app\common\business\PaymentBusiness)->getShopInfo($table_name,$shop_id);
|
|
|
if($shop_info && $shop_info['invite_id'] && $shangwu_amount > 0){
|
|
@@ -80,7 +80,7 @@ class Demo extends Api
|
|
|
|
|
|
|
|
|
$suoke_rate = config('site.back_suoke');
|
|
|
- $suoke_amount = bcdiv(bcmul($amount,$suoke_rate,2),100,2);
|
|
|
+ $suoke_amount = bcdiv(bcmul($amount,$suoke_rate,4),100,2);
|
|
|
|
|
|
$suoke_invite_id = Db::name('user')->where('id',$user_id)->value('invite_id');
|
|
|
if($suoke_invite_id && $suoke_amount > 0){
|
|
@@ -150,7 +150,7 @@ class Demo extends Api
|
|
|
$butie = $level['butie'];
|
|
|
$ticheng_rate = $level['ticheng_rate'];
|
|
|
|
|
|
- $yeji = bcdiv(bcmul($invite_amount,$ticheng_rate,2),100,2);
|
|
|
+ $yeji = bcdiv(bcmul($invite_amount,$ticheng_rate,4),100,2);
|
|
|
|
|
|
$yingxiao_level = $level['id'];
|
|
|
|
|
@@ -172,7 +172,7 @@ class Demo extends Api
|
|
|
$butie = $level['butie'];
|
|
|
$ticheng_rate = $level['ticheng_rate'];
|
|
|
|
|
|
- $yeji = bcdiv(bcmul($invite_amount,$ticheng_rate,2),100,2);
|
|
|
+ $yeji = bcdiv(bcmul($invite_amount,$ticheng_rate,4),100,2);
|
|
|
|
|
|
$yingxiao_level = $level['id'];
|
|
|
|