From 0d5ab01f3234657fd35b8fbc23ff6b7b37bc7507 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 31 Mar 2021 18:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E6=89=93=E6=AC=BE=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Fbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessAffairsAwardController.class.php | 2 +- .../Admin/Controller/TimingController.class.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/BusinessAffairsAwardController.class.php b/Application/Admin/Controller/BusinessAffairsAwardController.class.php index 10bccd905..b398a9e50 100644 --- a/Application/Admin/Controller/BusinessAffairsAwardController.class.php +++ b/Application/Admin/Controller/BusinessAffairsAwardController.class.php @@ -214,7 +214,7 @@ class BusinessAffairsAwardController extends ThinkController $detail .= "
"; } - $data[$key]['total_quarter_bonus_pool'] = $value['quarter_bonus_pool'] * 0.25; + $data[$key]['total_quarter_bonus_pool'] = round($value['quarter_bonus_pool'] * 0.25,2); $time = date("m",strtotime($value['time'])); if (!in_array($time,$check_quarter)) { diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index db5119a88..973e5c144 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -1563,6 +1563,7 @@ class TimingController extends AdminController { echo date("Y-m-d H:i:s")."----------------------商务奖金计算----------------------\n"; +// dump($this->businessAffairRatio(3471300));die(); if (!$_REQUEST['time']) { @@ -1618,23 +1619,24 @@ class TimingController extends AdminController { foreach($data as $key => $value) { - $month_bonus_pool += $this->businessAffairRatio($value['pay_amount']); + $month_bonus_pool += $value['pay_amount']; - $quarter_bonus_pool = $this->businessAffairRatio($value['pay_amount']); + $quarter_bonus_pool = $value['pay_amount']; if ($is_hav) { for($i = (($value['month']%3)?(($value['month']%3)-1):2); $i > 0; $i--) { $date = date("Y-m",strtotime($value['year'].'-'.(($value['month']-$i)>0?($value['month']-$i):($value['month']-$i+12)))); - dump($date); - $quarter_bonus_pool += - $this->businessAffairRatio($handleData[$date.$value['game_belong_id'].$value['relation_game_id']]['pay_amount']); + + $quarter_bonus_pool += $handleData[$date.$value['game_belong_id'].$value['relation_game_id']]['pay_amount']; } } } + $month_bonus_pool = $this->businessAffairRatio($month_bonus_pool); + $quarter_bonus_pool = $this->businessAffairRatio($quarter_bonus_pool); foreach ($data as $key => $value){