@ -294,6 +294,11 @@ class CompanyStatementPoolController extends ThinkController
$v['statement_money'] = "=ROUND(";
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$row = 0;
foreach($v['statement_info'] as $ke=>& $va){
$va['row'] = count($va['game_list']);
@ -336,15 +341,13 @@ class CompanyStatementPoolController extends ThinkController
$v['statement_money'] .= "N{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['sum_money'] += $val['sum_money'];
// $count['sum_money'] += $val['sum_money'];
}
}
$count['week_money'] += $va['week_amount'];
$count['sum_money'] += $va['week_amount'];
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$v['row'] = $row;
if($is_export){
if($v['withdraw_type'] != 3) {
@ -388,6 +391,10 @@ class CompanyStatementPoolController extends ThinkController
$v['statement_money'] = "=ROUND(";
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$row = 0;
foreach($v['statement_info'] as $ke=>& $va){
$va['row'] = count($va['game_list']);
@ -430,15 +437,13 @@ class CompanyStatementPoolController extends ThinkController
$v['statement_money'] .= "N{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['sum_money'] += $val['sum_money'];
// $count['sum_money'] += $val['sum_money'];
}
}
$count['week_money'] += $va['week_amount'];
$count['sum_money'] += $va['week_amount'];
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;
$v['row'] = $row;
if($is_export){
if($v['withdraw_type'] != 3) {
@ -484,7 +489,7 @@ class CompanyStatementPoolController extends ThinkController
$v['statement_money'] = "=ROUND(";
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
// dump($handle_data);
$v['statement_info'] = $handle_data;
$row = 0;
foreach($v['statement_info'] as $ke=>& $va){
@ -515,17 +520,19 @@ class CompanyStatementPoolController extends ThinkController
if($v['withdraw_type'] != 3) {
$val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)";
} else {
$val['sum_money'] = "=ROUND(K{$line}*(N{$line}),2)";
$val['sum_money'] = "=ROUND(( K{$line}-L{$line}) *(N{$line}),2)";
}
$v['statement_money'] .= "S{$line}+";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['week_money'] += $val['sum_money'];
$count['sum_money'] += $val['sum_money'];
// $count['sum_money'] += $val['sum_money'];
}
}
$count['week_money'] += $va['week_amount'];
$count['sum_money'] += $va['week_amount'];
}
// dump($count);
$v['row'] = $row;
@ -598,7 +605,7 @@ class CompanyStatementPoolController extends ThinkController
//周结算金额计算
for ($i=0;;$i++) {
if ($sv[$i]['sum_money']) {
$game_data['week_amount'] += $sv[$i]['sum_money'];
$game_data['week_amount'] += $sv[$i]['sum_money']- $sv[$i]['withhold'] ;
$game_data['withhold_amount'] += $sv[$i]['withhold'];
$game_data['fine'] += $sv[$i]['fine'];
$game_data['reward'] += $sv[$i]['reward'];
@ -696,7 +703,7 @@ class CompanyStatementPoolController extends ThinkController
}
}
// dump($handle_data);
return $handle_data?$handle_data:[];
}
@ -1699,7 +1706,7 @@ class CompanyStatementPoolController extends ThinkController
$statement_amount = 0;
$statement_lack_amount = 0;
// dump($increment_ratio);
foreach ($increment_ratio as $key => $value) {
$statement_info = array();
@ -1732,12 +1739,12 @@ class CompanyStatementPoolController extends ThinkController
$statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk];
$amount += $sum_money[$key][$v['account']][$gk];
$amount += $sum_money[$key][$v['account']][$gk] - $statement_info[$k]['game_list'][$gk]['withhold'] ;
if ($st[$key][$akey] == 1) {
$statement_amount += $sum_money[$key][$v['account']][$gk];
$statement_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold'] ;
} else {
$statement_lack_amount += $sum_money[$key][$v['account']][$gk];
$statement_lack_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold'] ;
}
}