优化结算单下游特殊

master
chenzhi 3 years ago
parent 5cf324d8c4
commit 67f5ae2d85

@ -1199,6 +1199,7 @@ class CompanyStatementController extends ThinkController
$count = [];
$week_line = 2;
$withdraw_type = false;
//获取对接人
foreach($infolist as $k=>&$v){
$infolist[$k]['reward'] = 0;
@ -1239,6 +1240,9 @@ class CompanyStatementController extends ThinkController
$row += count($va['game_list']);
foreach($va['game_list'] as $key=>&$val){
if(!$withdraw_type){
$withdraw_type = $v['withdraw_type'];
}
$line ++;
if($v['withdraw_type'] != 3) {
if(isset($val['ratio'])){
@ -1250,12 +1254,12 @@ class CompanyStatementController extends ThinkController
if($is_export){
if($v['withdraw_type'] != 3) {
$val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)";
$val['sum_money'] = "=ROUND((L{$line}-M{$line})*(N{$line}+O{$line}),2)";
} else {
$val['sum_money'] = "=ROUND((K{$line}-L{$line})*(N{$line}),2)";
$val['sum_money'] = "=ROUND((L{$line}-M{$line})*(O{$line}),2)";
}
// $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})";
$v['statement_money'] .= "S{$line}+";
$v['statement_money'] .= "T{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['sum_money'] += $val['sum_money'];
@ -1274,14 +1278,17 @@ class CompanyStatementController extends ThinkController
}
if($is_export){
$count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)";
$count["week_money"] = "=ROUND(SUM(S2:S".$line."),2)";
$count["sum_money"] = "=ROUND(SUM(T2:T".$line."),2)";
$count["platform_amount"] = "=ROUND(SUM(L2:L".$line."),2)";
$count["week_money"] = "=ROUND(SUM(T2:T".$line."),2)";
$count["sum_money"] = "=ROUND(SUM(U2:U".$line."),2)";
}
$this->assign("data",$infolist);
$this->assign("count",$count);
$this->assign("is_export",$is_export);
$this->assign("withdraw_type",$withdraw_type);
// dd($infolist);
$this->display("CompanyStatementPool/viewPuPool");
}

@ -1054,7 +1054,7 @@ class CompanyStatementPoolController extends ThinkController
$week_line += count($hv['game_list'])-1;
}
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(O{$old_line}:O{$week_line})+SUM(P{$old_line}:P{$week_line})-SUM(Q{$old_line}:Q{$week_line})-SUM(R{$old_line}:R{$week_line}),2)";
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(P{$old_line}:P{$week_line})+SUM(Q{$old_line}:Q{$week_line})-SUM(R{$old_line}:R{$week_line})-SUM(S{$old_line}:S{$week_line}),2)";
if ($hk > 0) {
$handle_data[0]['week_amount'] = str_replace($old_line,$week_line,$handle_data[0]['week_amount']);

@ -318,7 +318,7 @@
</foreach>
<if condition="$withdraw_type LT 2">
<tr>
<td colspan="9" rowspan="3"></td>
<td colspan="10" rowspan="3"></td>
<td>上周数据合计:</td>
<td>{$count.pool_week_count}</td>
<td colspan="5" rowspan="3"></td>
@ -360,7 +360,7 @@
<else />
<tr>
<td colspan=10 >合计:</td>
<td colspan=11 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>

Loading…
Cancel
Save