diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index eea86812d..5072032b7 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -201,50 +201,45 @@ class CompanyStatementPoolController extends ThinkController $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); $cline = $line+1; // if($v['fine'] > 0) $v['fine'] = 0-$v['fine']; - $v['statement_money_exp'] = "="; + if($is_export){ + $v['statement_money_exp'] = "="; + } + foreach($v['statement_info'] as $ke=>&$va){ $line ++; if($infolist[0]['company_type'] == 3){ - $va['sum_money_exp'] = "=F{$line}*G{$line}"; - $v['statement_money_exp'] .= "K{$line}+"; + $va['company_ratio'] = 100-$va['ratio']; if($is_export){ - $va['d_statement_money'] = $va['sum_money_exp']; + $v['statement_money_exp'] .= "K{$line}+"; + $va['d_statement_money'] = "=F{$line}*G{$line}"; + $count['platform_amount_exp'] .= "E{$line}+"; + $count['platform_amount_exp2'] .= "F{$line}+"; + $count['d_statement_money_exp'] .= "K{$line}+"; }else{ $va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2); + $count['platform_amount'] += $va['pay_amount']; + $count['platform_amount2'] += $va['pay_amount']; + $count['d_statement_money'] += $va['d_statement_money']; } - $count['platform_amount'] += $va['pay_amount']; - $count['platform_amount2'] += $va['pay_amount']; - $count['platform_amount_exp'] .= "E{$line}+"; - $count['platform_amount_exp2'] .= "F{$line}+"; - - $count['d_statement_money'] += $va['d_statement_money']; - $count['d_statement_money_exp'] .= "K{$line}+"; } } if($infolist[0]['company_type'] == 3){ //上游 $v['matche_platform'] = $Partner[$v['company_id']]; - $v['statement_money_exp'] .= "M{$cline}-L{$cline}"; - if($is_export){ + $v['statement_money_exp'] .= "M{$cline}-L{$cline}"; $v['statement_money'] = $v['statement_money_exp']; + $count['fine_exp'] .= "L{$cline}+"; + $count['reward_exp'] .= "M{$cline}+"; + $count['statement_money_exp'] .= "N{$cline}+"; + }else{ + $count['fine'] += $v['fine']; + $count['reward'] += $v['reward']; + $count['statement_money'] += $v['statement_money']; } - - //统计 - - - $count['fine'] += $v['fine']; - $count['fine_exp'] .= "L{$cline}+"; - - $count['reward'] += $v['reward']; - $count['reward_exp'] .= "M{$cline}+"; - - $count['statement_money'] += $v['statement_money']; - $count['statement_money_exp'] .= "N{$cline}+"; - } $v['statement_count'] = count($v['statement_info']); @@ -259,21 +254,18 @@ class CompanyStatementPoolController extends ThinkController $count["reward"] = "=".trim($count["reward_exp"],"+"); $count["statement_money"] = "=".trim($count["statement_money_exp"],"+"); } - - - } $this->assign("data",$infolist); $this->assign("count",$count); $this->assign("is_export",$is_export); - - // if($dbres["company_belong"] == 9){ + // dd($count); + if($infolist[0]['company_type'] == 3){ // //上游 $this->display("viewCpPool"); - // }else{ + }else{ // $this->display("viewPcStatement"); - // } + } } //审批通过