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 @@ + + + +
+ + +甲方: | +
+
+
+
+ |
+
联系人: | ++ + | +
联系电话: | ++ + | +
邮寄地址: | ++ + | +
公司税号: | ++ + | +
乙方: | +
+
+
+
+ |
+
联系人: | ++ + | +
联系电话: | ++ + | +
邮寄地址: | ++ + | +
公司税号: | ++ + | +
支付给:
结算时间 | +产品 | +平台总额 | +聚合流水 | +分成比例 | + +渠道费率 | +税费费率 | +其他 | +结算金额 | +
---|---|---|---|---|---|---|---|---|
+ 结算金额=平台总额*(1-渠道费)*分成比例*(1-税费费率) | +||||||||
+ 请先选择生成条件后点击生成对账数据 + | +
收款方名称: | ++ + | +
银行账号: | ++ + | +
开户行: | ++ + | +
开票项目: | ++ + | +
发票类型: | +
+
+
+
+ |
+