From f9503182da8e7aec8ec05b671fbd7d6385f24c6c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 30 Jul 2020 10:45:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=AE=A1=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 | 11 ++++++++ .../View/default/Withdraw/withdrawdetail.html | 28 ++++++++++--------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index 75fd5f83e..016c65f10 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -351,6 +351,14 @@ class MarketPercentageController extends ThinkController $data[$key]['wait_commission'] = substr(number_format($value['wait_performance_commission'] + $value['wait_achievement_commission'], 4, '.', ''),0,-2); $data[$key]['extend_commission'] = $data[$key]['commission'] - $data[$key]['wait_commission']; + //两个起提流水都没达到时,不展示税后毛利 + $sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses']; + if ($sum_amount<$market_percentage['performance_revenue']&&$sum_amount<$market_percentage['appraisal_bonuses']) { + $data[$key]['company_profit'] = "0.00"; + $value['company_profit'] = "0.00"; + } + + if ($market_percentage['time'] == 1) { if ($month == '07') { @@ -487,6 +495,9 @@ 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(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/Home/View/default/Withdraw/withdrawdetail.html b/Application/Home/View/default/Withdraw/withdrawdetail.html index e404b53f0..1ba801a31 100644 --- a/Application/Home/View/default/Withdraw/withdrawdetail.html +++ b/Application/Home/View/default/Withdraw/withdrawdetail.html @@ -391,19 +391,21 @@ - {$s['game_name']} - {$s['game_type']} - {$s['statement_begin_time']|default="无"}-{$statemnt_info[0]['statement_end_time']|default="无"} - - {$s['pay_amount']|default="0"} - {$s['ratio']|default="0"} - {$s['increment_ratio']|default="0"} - {$s['reward']|default="0"} - {$s['fine']|default="0"} - {$s['sum_money']|default="0"} - - 查看详情 - + + {$s['game_name']} + {$s['game_type']} + {$s['statement_begin_time']|default="无"}-{$statemnt_info[0]['statement_end_time']|default="无"} + + {$s['pay_amount']|default="0"} + {$s['ratio']|default="0"} + {$s['increment_ratio']|default="0"} + {$s['reward']|default="0"} + {$s['fine']|default="0"} + {$s['sum_money']|default="0"} + + 查看详情 + + From 7aa031bbb4883459dc6f93912df6bece256c1382 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 30 Jul 2020 15:41:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=AE=A1=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"} - 查看详情 + 查看详情