|
|
|
@ -357,6 +357,7 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)";
|
|
|
|
|
$count["sum_money"] = "=ROUND(SUM(Q2:Q".$line."),2)";
|
|
|
|
|
}
|
|
|
|
|
// dump($infolist);
|
|
|
|
|
$this->assign("data",$infolist);
|
|
|
|
|
$this->assign("count",$count);
|
|
|
|
|
$this->assign("is_export",$is_export);
|
|
|
|
@ -450,6 +451,7 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)";
|
|
|
|
|
$count["sum_money"] = "=ROUND(SUM(Q2:Q".$line."),2)";
|
|
|
|
|
}
|
|
|
|
|
// dump($infolist);
|
|
|
|
|
$this->assign("data",$infolist);
|
|
|
|
|
$this->assign("count",$count);
|
|
|
|
|
$this->assign("is_export",$is_export);
|
|
|
|
@ -595,6 +597,7 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
for ($i=0;;$i++) {
|
|
|
|
|
if ($sv[$i]['sum_money']) {
|
|
|
|
|
$game_data['week_amount'] += $sv[$i]['sum_money'];
|
|
|
|
|
$game_data['withhold_amount'] += $sv[$i]['withhold'];
|
|
|
|
|
$game_data['fine'] += $sv[$i]['fine'];
|
|
|
|
|
$game_data['reward'] += $sv[$i]['reward'];
|
|
|
|
|
} else {
|
|
|
|
@ -634,6 +637,7 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$handle_data[$hk-$substract]['time_row'] += $handle_data[$hk]['time_row'];
|
|
|
|
|
|
|
|
|
|
$handle_data[$hk-$substract]['week_amount'] += $handle_data[$hk]['week_amount'];
|
|
|
|
|
$handle_data[$hk-$substract]['withhold_amount'] += $handle_data[$hk]['withhold_amount'];
|
|
|
|
|
|
|
|
|
|
unset($handle_data[$hk]['time']);
|
|
|
|
|
unset($handle_data[$hk]['time_row']);
|
|
|
|
@ -1584,7 +1588,10 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($info['withdraw_type'] == "特殊补点") {
|
|
|
|
|
$optist = ['viewPool','cancelPool','editSpecialPuPool'];
|
|
|
|
|
$optist = ['viewPool','cancelPool'];
|
|
|
|
|
if ($info['company_type'] == 2 && $info['verify_status'] == '0') {
|
|
|
|
|
array_push($optist,'editSpecialPuPool');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($info['company_type'] == 2 && $info['verify_status'] == '0'&&$info['withdraw_type'] != "特殊补点") {
|
|
|
|
@ -1668,13 +1675,18 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$statement_amount = 0;
|
|
|
|
|
$statement_lack_amount = 0;
|
|
|
|
|
|
|
|
|
|
// dump($increment_ratio);
|
|
|
|
|
foreach ($increment_ratio as $key => $value) {
|
|
|
|
|
|
|
|
|
|
if ($st[$key] == 1) {
|
|
|
|
|
$statement_info = array();
|
|
|
|
|
foreach($value as $akey => $aval) {
|
|
|
|
|
|
|
|
|
|
if ($st[$key][$akey] == 1) {
|
|
|
|
|
$model = M("company_statement_info","tab_");
|
|
|
|
|
} else {
|
|
|
|
|
$model = M("company_lack_statement_info","tab_");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$statement_data = $model->where(['id'=>$key])->find();
|
|
|
|
|
|
|
|
|
|
$statement_info = json_decode($statement_data['statement_info'],true);
|
|
|
|
@ -1684,11 +1696,13 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
$game_list = $v['game_list'];
|
|
|
|
|
|
|
|
|
|
foreach ($game_list as $gk => $gv) {
|
|
|
|
|
|
|
|
|
|
if ($ratio[$key][$v['account']][$gk]) {
|
|
|
|
|
$statement_info[$k]['game_list'][$gk]['ratio'] = $ratio[$key][$v['account']][$gk];
|
|
|
|
|
$statement_info[$k]['game_list'][$gk]['ratio'] = (int)$ratio[$key][$v['account']][$gk];
|
|
|
|
|
}
|
|
|
|
|
$statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$gk];
|
|
|
|
|
$statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$v['account']][$gk];
|
|
|
|
|
$statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$v['account']][$gv['statement_begin_time']];
|
|
|
|
|
$withhold[$key][$v['account']][$gv['statement_begin_time']] = 0;
|
|
|
|
|
|
|
|
|
|
$statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$gk];
|
|
|
|
|
|
|
|
|
@ -1696,22 +1710,25 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$amount += $sum_money[$key][$v['account']][$gk];
|
|
|
|
|
|
|
|
|
|
if ($st[$key] == 1) {
|
|
|
|
|
if ($st[$key][$akey] == 1) {
|
|
|
|
|
$statement_amount += $sum_money[$key][$v['account']][$gk];
|
|
|
|
|
} else {
|
|
|
|
|
$statement_lack_amount += $sum_money[$key][$v['account']][$gk];
|
|
|
|
|
}
|
|
|
|
|
// dump($v['account']);
|
|
|
|
|
// dump($sum_money[$key][$v['account']][$gk]);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$statement_info = json_encode($statement_info);
|
|
|
|
|
$statement_info_data = json_encode($statement_info);
|
|
|
|
|
|
|
|
|
|
$model->where(['id'=>$key])->save(['statement_info'=>$statement_info,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]);
|
|
|
|
|
$model->where(['id'=>$key])->save(['statement_info'=>$statement_info_data,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]);
|
|
|
|
|
|
|
|
|
|
$amount = 0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount,'lack_statement_money'=>$statement_lack_amount]);
|
|
|
|
|