Merge branch 'feature/finance_statement_three' of wmtx/platform into release

优化汇总导出错误
master
陈志 4 years ago committed by Gogs
commit 8fbf101e88

@ -118,10 +118,10 @@ class CompanyStatementPoolController extends ThinkController
$v['company_type_str'] = $this->CompanyType[$v['company_type']]; $v['company_type_str'] = $this->CompanyType[$v['company_type']];
$v['is_payment_str'] = $this->IsPayment[$v['is_payment']]; $v['is_payment_str'] = $this->IsPayment[$v['is_payment']];
$v['can_export'] = $v['statement_money'] == 0 ? "0" : '1'; // $v['can_export'] = $v['platform_amount'] == 0 ? "0" : '1';
if($v['company_type'] == 2){ // if($v['company_type'] == 2){
$v['can_export'] = 1; $v['can_export'] = 1;
} // }
$v['op_time'] = date('Y.m.d H:i:s',$v['op_time']); $v['op_time'] = date('Y.m.d H:i:s',$v['op_time']);
$v["valid"] = "{$v['statement_begin_time']}-{$v['statement_end_time']}"; $v["valid"] = "{$v['statement_begin_time']}-{$v['statement_end_time']}";
@ -285,7 +285,6 @@ class CompanyStatementPoolController extends ThinkController
$count["platform_amount"] = "=SUM(J2:J".$line.")"; $count["platform_amount"] = "=SUM(J2:J".$line.")";
$count["sum_money"] = "=SUM(P2:P".$line.")"; $count["sum_money"] = "=SUM(P2:P".$line.")";
} }
// dd($infolist);
$this->assign("data",$infolist); $this->assign("data",$infolist);
$this->assign("count",$count); $this->assign("count",$count);
$this->assign("is_export",$is_export); $this->assign("is_export",$is_export);
@ -317,9 +316,6 @@ class CompanyStatementPoolController extends ThinkController
} }
} }
$cline = $line+1; $cline = $line+1;
if($is_export){
$v['statement_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){ foreach($v['statement_info'] as $ke=>&$va){
$line ++; $line ++;
if(isset($va['ratio'])){ if(isset($va['ratio'])){
@ -329,8 +325,6 @@ class CompanyStatementPoolController extends ThinkController
} }
if($is_export){ if($is_export){
$v['statement_money_exp'] .= "H{$line}+";
$va['d_statement_money'] = "=D{$line}*(1-G{$line})*(E{$line}+F{$line})"; $va['d_statement_money'] = "=D{$line}*(1-G{$line})*(E{$line}+F{$line})";
}else{ }else{
$va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2); $va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2);
@ -343,8 +337,7 @@ class CompanyStatementPoolController extends ThinkController
$v['settlement_contact'] = $Partner[$v['company_id']]; $v['settlement_contact'] = $Partner[$v['company_id']];
if($is_export){ if($is_export){
$v['statement_money_exp'] .= "J{$cline}-I{$cline}"; $v['statement_money'] = "=SUM(H{$cline}:H{$line})+J{$cline}-I{$cline}";
$v['statement_money'] = $v['statement_money_exp'];
}else{ }else{
$count['fine'] += $v['fine']; $count['fine'] += $v['fine'];
$count['reward'] += $v['reward']; $count['reward'] += $v['reward'];
@ -398,14 +391,10 @@ class CompanyStatementPoolController extends ThinkController
} }
$cline = $line+1; $cline = $line+1;
if($is_export){
$v['statement_money_exp'] = "=";
}
foreach($v['statement_info'] as $ke=>&$va){ foreach($v['statement_info'] as $ke=>&$va){
$line ++; $line ++;
$va['company_ratio'] = 100-$va['ratio']; $va['company_ratio'] = 100-$va['ratio'];
if($is_export){ if($is_export){
$v['statement_money_exp'] .= "K{$line}+";
$va['d_statement_money'] = "=F{$line}*G{$line}"; $va['d_statement_money'] = "=F{$line}*G{$line}";
}else{ }else{
$va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2); $va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2);
@ -416,8 +405,7 @@ class CompanyStatementPoolController extends ThinkController
} }
$v['matche_platform'] = $Partner[$v['company_id']]; $v['matche_platform'] = $Partner[$v['company_id']];
if($is_export){ if($is_export){
$v['statement_money_exp'] .= "M{$cline}-L{$cline}"; $v['statement_money'] = "=SUM(K{$cline}:K{$line})+M{$cline}-L{$cline}";
$v['statement_money'] = $v['statement_money_exp'];
}else{ }else{
$count['fine'] += $v['fine']; $count['fine'] += $v['fine'];
$count['reward'] += $v['reward']; $count['reward'] += $v['reward'];

@ -119,8 +119,10 @@
<th colspan=3 style="border-right: solid 1px #b6cad2;">账户信息</th> <th colspan=3 style="border-right: solid 1px #b6cad2;">账户信息</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">备注</th> <th rowspan="2" style="border-right: solid 1px #b6cad2;">备注</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">操作</th>
<if condition="!$is_export">
<th rowspan="2" style="border-right: solid 1px #b6cad2;">操作</th>
</if>
</tr> </tr>
<tr> <tr>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">合作方</th> <th style="border-right: solid 1px #b6cad2;min-width: 50px;">合作方</th>
@ -150,7 +152,7 @@
<td rowspan="{$com.statement_count}">{$com['fine']-0}</td> <td rowspan="{$com.statement_count}">{$com['fine']-0}</td>
<td rowspan="{$com.statement_count}">{$com['reward']-0}</td> <td rowspan="{$com.statement_count}">{$com['reward']-0}</td>
<td rowspan="{$com.statement_count}">{$com['statement_money']-0}</td> <td rowspan="{$com.statement_count}">{$com['statement_money']}</td>
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td> <td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1"><else /></if></td> <td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1"><else /></if></td>

@ -136,7 +136,7 @@
<td>{$com['statement_info'][0]['d_statement_money']}</td> <td>{$com['statement_info'][0]['d_statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com['fine']-0}</td> <td rowspan="{$com.statement_count}">{$com['fine']-0}</td>
<td rowspan="{$com.statement_count}">{$com['reward']-0}</td> <td rowspan="{$com.statement_count}">{$com['reward']-0}</td>
<td rowspan="{$com.statement_count}">{$com['statement_money']-0}</td> <td rowspan="{$com.statement_count}">{$com['statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com.settlement_contact}</td> <td rowspan="{$com.statement_count}">{$com.settlement_contact}</td>
<td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td> <td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>

Loading…
Cancel
Save