diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index fdd4be162..870914382 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -828,17 +828,17 @@ class MarketPercentageController extends ThinkController $value['company_profit'] = "0.00"; } // - $data[$key]['should_performance_commission'] = substr(number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 4, '.', ''),0,-2)+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']; - $data[$key]['should_month_bonus_ratio'] = substr(number_format($value["achievement_bonus"] * ($market_percentage["month_bonus_ratio"]/100), 4, '.', ''),0,-2) + $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; + $data[$key]['should_performance_commission'] = number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 2, '.', '')+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']; $data[$key]['extend_commission'] += $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; + $data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', ''); + $data[$key]['should_month_bonus_ratio'] = $data[$key]['extend_commission'] - $data[$key]['should_performance_commission']; // dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']); // dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']); // $data[$key]['wait_commission'] += $this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; - $data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', ''); $data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'], 2, '.', ''); $data[$key]['achievement_bonus'] = $achievement_bonus;