From 7aa031bbb4883459dc6f93912df6bece256c1382 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 30 Jul 2020 15:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=BB=93=E7=AE=97=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MarketPercentageController.class.php | 26 ++++++++++++++++--- .../Controller/TimingController.class.php | 12 +++++++++ .../View/default/Withdraw/withdrawdetail.html | 4 +-- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index 016c65f10..d1f706fcd 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -495,11 +495,31 @@ class MarketPercentageController extends ThinkController $line = $key+2; // $develop_commission_ratio = $value['develop_commission_ratio']/100; $data[$key]['pay_time'] = '`'.$data[$key]['pay_time']; - if ($value['']) { + $data[$key]['performance_commission'] = "=ROUND("; + $data[$key]['achievement_bonus'] = "=ROUND("; + if ($value['performance_revenue'] != "0.00") { + $data[$key]['performance_commission'] .= "J{$line}*(F{$line}/100)"; + $data[$key]['achievement_bonus'] .= "J{$line}*(H{$line}/100)"; } - $data[$key]['performance_commission'] = "=ROUND(J{$line}*(F{$line}/100)+J{$line}*(G{$line}/100),2)"; - $data[$key]['achievement_bonus'] = "=ROUND(J{$line}*(H{$line}/100)+J{$line}*(I{$line}/100),2)"; + if ($value['appraisal_bonuses'] != "0.00") { + if ($data[$key]['performance_commission'] == "=ROUND(") { + $data[$key]['performance_commission'] .= "J{$line}*(G{$line}/100),2)"; + } else { + $data[$key]['performance_commission'] .= "+J{$line}*(G{$line}/100),2)"; + } + + if ($data[$key]['achievement_bonus'] == "=ROUND(") { + $data[$key]['achievement_bonus'] .= "J{$line}*(I{$line}/100),2)"; + } else { + $data[$key]['achievement_bonus'] .= "+J{$line}*(I{$line}/100),2)"; + } + } else { + $data[$key]['performance_commission'] .= ",2)"; + $data[$key]['achievement_bonus'] .= ",2)"; + } +// $data[$key]['performance_commission'] = "=ROUND(J{$line}*(F{$line}/100)+J{$line}*(G{$line}/100),2)"; +// $data[$key]['achievement_bonus'] = "=ROUND(J{$line}*(H{$line}/100)+J{$line}*(I{$line}/100),2)"; $data[$key]['commission'] = "=ROUND(K{$line}+L{$line},2)"; } diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index 79f4dbd6a..2c04fa38f 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -1010,6 +1010,18 @@ class TimingController extends AdminController { $sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses']; $market_percentage = json_decode($value['market_percentage'],true);//业绩提成 + + if ($value['performance_revenue']=='0.00') { + $market_percentage['develop_commission_ratio'] = 0; + $market_percentage['appraisal_bonuses_ratio'] = 0; + } + + if ($value['appraisal_bonuses']=='0.00') { + $market_percentage['maintain_commission_ratio'] = 0; + $market_percentage['maintain_appraisal_bonuses_ratio'] = 0; + } +// echo "{$value['nickname']}:{$value['pay_time']}\n"; +// dump($market_percentage); $all_data[$key]['performance_commission'] = number_format($value['company_profit']*($market_percentage['develop_commission_ratio']/100) + $value['company_profit']*($market_percentage['maintain_commission_ratio']/100), 2, '.', ''); diff --git a/Application/Home/View/default/Withdraw/withdrawdetail.html b/Application/Home/View/default/Withdraw/withdrawdetail.html index 1ba801a31..87bd64f8b 100644 --- a/Application/Home/View/default/Withdraw/withdrawdetail.html +++ b/Application/Home/View/default/Withdraw/withdrawdetail.html @@ -385,7 +385,7 @@ {$statemnt_info[0]['fine']|default="0"} {$statemnt_info[0]['sum_money']|default="0"} - 查看详情 + 查看详情 @@ -403,7 +403,7 @@ {$s['fine']|default="0"} {$s['sum_money']|default="0"} - 查看详情 + 查看详情