diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index cbc15fca6..06eda5aeb 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -370,13 +370,24 @@ class CompanyStatementController extends ThinkController if ($value['game_name'] == "罚款" || $value['game_name'] == "奖励") { $dbres['statement_info'][$key]['pay_amount'] = "-"; } + + + $real_statement_amount + = number_format($value['platform_money']*(1-$value['promote_ratio']/100)*($value['ratio']/100)*(1-$value["fax_ratio"]/100),2,'.','');; + if (!$dbres['statement_info'][$key]['other_amount']) { + $dbres['statement_info'][$key]['other_amount'] = number_format($value["sum_money"] - $real_statement_amount,2,'.',''); + } } } $this->assign("data", $dbres); if ($dbres["company_belong"] == 9) { //上游 - $this->display("editCpStatement"); + if (IS_SUBSITE) { + $this->display("editWmCpStatement"); + } else { + $this->display("editCpStatement"); + } } else { if ($dbres["withdraw_type"] == 3) { if($dbres["company_type"] == 1){ @@ -626,23 +637,23 @@ class CompanyStatementController extends ThinkController $map['company_belong'] = 9; $data = SM("company_statement","tab_") - ->field("id,company_id,company_name,FROM_UNIXTIME(statement_begin_time,'%m') time,statement_money,platform_amount,statement_info") + ->field("id,company_id,company_name,FROM_UNIXTIME(statement_begin_time,'%m') time,statement_money,platform_amount,statement_info,withdraw_type") ->where($map) ->select(); $use_data = [ - "01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"]], - "02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"]], - "03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"]], - "04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"]], - "05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"]], - "06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"]], - "07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"]], - "08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"]], - "09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"]], - "10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"]], - "11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"]], - "12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"]], + "01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"],"row"=>1], + "02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"],"row"=>1], + "03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"],"row"=>1], + "04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"],"row"=>1], + "05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"],"row"=>1], + "06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"],"row"=>1], + "07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"],"row"=>1], + "08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"],"row"=>1], + "09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"],"row"=>1], + "10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"],"row"=>1], + "11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"],"row"=>1], + "12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"],"row"=>1], ]; $row = 0; @@ -688,7 +699,16 @@ class CompanyStatementController extends ThinkController } $data[$key]["statement_info"] = $statement_info; - $use_data[$value['time']] = $data[$key]; + if (!$use_data[$value['time']]["statement_info"]) { + $use_data[$value['time']] = $data[$key]; + } + else { + foreach ($statement_info as $sk => $sv) { + array_push($use_data[$value['time']]["statement_info"], $sv); + } + } + + } $sum[$ckey]["ratio"] = number_format($sum[$ckey]["ratio"]/$row,2,'.','')."%"; @@ -699,6 +719,13 @@ class CompanyStatementController extends ThinkController } + foreach ($assign_data as $key => $value) { + foreach ($value as $k => $v) { + $assign_data[$key][$k]["row"] = count($v["statement_info"])?count($v["statement_info"]):1; + } + } + +// dump($assign_data); $is_export= false; if (isset($_REQUEST['is_export']) && $_REQUEST['is_export']==1){ $is_export = true; diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index a9a59e025..64644ff6d 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -828,6 +828,9 @@ 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]['extend_commission'] += $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; // dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']); @@ -848,6 +851,11 @@ class MarketPercentageController extends ThinkController $sum['extend_commission'] += $data[$key]['extend_commission']; $sum['company_profit'] += $data[$key]['company_profit']; + $sum['should_performance_commission'] += $data[$key]['should_performance_commission']; + $sum['should_month_bonus_ratio'] += $data[$key]['should_month_bonus_ratio']; + + $sum['wait_performance_commission'] += $data[$key]['wait_performance_commission']; + $sum['wait_achievement_commission'] += $data[$key]['wait_achievement_commission']; } // die(); @@ -871,8 +879,12 @@ class MarketPercentageController extends ThinkController 'achievement_bonus' => '绩效考核奖金', 'coefficient' => '绩效系数', 'commission' => '当月合计', - 'extend_commission' => '应发金额', - 'wait_commission' => '待发金额', +// 'extend_commission' => '应发金额', +// 'wait_commission' => '待发金额', + 'should_performance_commission'=>'本月应发业绩提成', + 'should_month_bonus_ratio'=>'本月应发绩效考核奖金', + 'wait_performance_commission'=>'待发业绩提成', + 'wait_achievement_commission'=>'待发绩效考核奖金', 'coefficient_check_detail' => '绩效确认', 'market_check_detail' => '市场部确认', 'finance_check_detail' => '财务部审批']; diff --git a/Application/Admin/View/CompanyStatement/editWmCpStatement.html b/Application/Admin/View/CompanyStatement/editWmCpStatement.html new file mode 100644 index 000000000..f3f315e64 --- /dev/null +++ b/Application/Admin/View/CompanyStatement/editWmCpStatement.html @@ -0,0 +1,676 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
甲方: +
+ +
+
联系人: + +
联系电话: + +
邮寄地址: + +
公司税号: + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
乙方: +
+ +
+
联系人: + +
联系电话: + +
邮寄地址: + +
公司税号: + +
+
+
+
+
+

支付给:{$data.company_name} + +

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
结算时间产品平台总额聚合流水分成比例渠道费率税费费率其他结算金额
+ 结算金额=平台总额*(1-渠道费)*分成比例*(1-税费费率)
+ 请先选择生成条件后点击生成对账数据 +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
收款方名称: + +
银行账号: + +
开户行: + +
+
+
+ + + + + + + + + + + +
开票项目: + +
发票类型: +
+ +
+
+
+
+
+
+
+ 确认修改 +
+
+ + + + + + + + + \ No newline at end of file diff --git a/Application/Admin/View/CompanyStatement/showCpStatementView.html b/Application/Admin/View/CompanyStatement/showCpStatementView.html index c60a33f16..bab81c5f0 100644 --- a/Application/Admin/View/CompanyStatement/showCpStatementView.html +++ b/Application/Admin/View/CompanyStatement/showCpStatementView.html @@ -128,7 +128,7 @@ {$datas['show_company_name']} {$time}年{$datas["time"]}月 - {$datas['statement_info'][0]['game_name']|default="--"} + {$datas['statement_info'][0]['game_name']|default="--"}({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']}) -- -- -- @@ -138,7 +138,7 @@ -- -{$datas['statement_info'][0]['sum_money']|default="--"} - {$datas['statement_info'][0]['game_name']|default="--"} + {$datas['statement_info'][0]['game_name']|default="--"}({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']}) {$datas['statement_info'][0]['platform_money']|default="--"} {$datas['statement_info'][0]['aggregate_money']|default="--"} {$datas['statement_info'][0]['sum_amount']|default="--"} @@ -154,7 +154,7 @@ - {$statement_info['game_name']|default="--"} + {$statement_info['game_name']|default="--"}({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']}) -- -- -- @@ -165,7 +165,7 @@ -{$statement_info['sum_money']|default="--"} - {$statement_info['game_name']|default="--"} + {$statement_info['game_name']|default="--"}({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']}) {$statement_info['platform_money']|default="--"} {$statement_info['aggregate_money']|default="--"} {$statement_info['sum_amount']|default="--"} diff --git a/Application/Admin/View/MarketPercentage/marketstaffsettle.html b/Application/Admin/View/MarketPercentage/marketstaffsettle.html index 2f3b9240f..496bb2cc0 100644 --- a/Application/Admin/View/MarketPercentage/marketstaffsettle.html +++ b/Application/Admin/View/MarketPercentage/marketstaffsettle.html @@ -202,8 +202,12 @@
绩效考核奖金当月开发税后毛利奖金与维护税后毛利奖金之和
绩效系数 当月合计 - 本月应发金额 - 待发金额 + + 本月应发业绩提成 + 本月应发绩效考核奖金 + + 待发业绩提成 + 待发绩效考核奖金 绩效确认 市场部确认 财务部审批 @@ -232,8 +236,16 @@ {$data['achievement_bonus']|default='0.00'} {$data['coefficient']|default='1'} {$data['commission']|default='0.00'} - {$data['extend_commission']|default='0.00'} - {$data['wait_commission']|default='0.00'} + + + {$data['should_performance_commission']|default='0.00'} + {$data['should_month_bonus_ratio']|default='0.00'} + + + + {$data['wait_performance_commission']|default='0.00'} + {$data['wait_achievement_commission']|default='0.00'} + {$data['coefficient_check_detail']|default=''} {$data['market_check_detail']|default=''} {$data['finance_check_detail']|default=''} @@ -254,8 +266,8 @@ {$sum['achievement_bonus']|default='0.00'} {$sum['commission']|default='0.00'} - {$sum['extend_commission']|default='0.00'} - + {$sum['should_performance_commission']|default='0.00'} + {$sum['should_month_bonus_ratio']|default='0.00'} diff --git a/Data/update.sql b/Data/update.sql index e597752f2..1f69fdff3 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2794,4 +2794,8 @@ ALTER TABLE `tab_company_statement_info` ADD COLUMN `is_reward_fine_split` tinyint(255) NULL DEFAULT 0 COMMENT '是否是奖罚分离生成 0 否 1 是' AFTER `pay_check_time`; ALTER TABLE `platform_wm`.`tab_company_statement_pool` -ADD COLUMN `wm_statement_ids` int(11) NOT NULL DEFAULT 0 COMMENT '子系统财务结算单id' AFTER `remark`; \ No newline at end of file +ADD COLUMN `wm_statement_ids` int(11) NOT NULL DEFAULT 0 COMMENT '子系统财务结算单id' AFTER `remark`; + +ALTER TABLE `tab_reward_record` +ADD COLUMN `is_verify` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否审核' AFTER `settlement_time`, +ADD COLUMN `verify_detail` longtext NULL COMMENT '审核详情' AFTER `is_verify`;