@ -1096,6 +1096,10 @@ class CompanyStatementSetController extends Controller {
->join("left join tab_game g on s.game_id = g.id")
->select();
if ($company_id == 64) {
dump($all_list);
}
if(empty($list)){continue;}
$game = [];
foreach($list as $k=>$v){
@ -1125,7 +1129,6 @@ class CompanyStatementSetController extends Controller {
$temp = 0;
for ($j=0; $j < count ( $ v ) ; $ j + + ) {
$turnover_type = $this->getTurnoverType($v[$j],$company_id,$begintime,$endtime);
if ($turnover_type == 2) {
$temp += $allgame[$v[$j]]['pay_amount'];
} else {
@ -1156,7 +1159,18 @@ class CompanyStatementSetController extends Controller {
}else{
unset($v['game_id']);
$res[$company_id][$p_account][$v['relation_game_id']]= $v;
$res[$company_id][$p_account][$v['relation_game_id']]['all_pay_amount']= $game[$v['relation_game_id']]['pay_amount'];
$turnover_type = $this->getTurnoverType($v['relation_game_id'],$company_id,$begintime,$endtime);
if ($turnover_type == 2) {
// $temp += $allgame[$v[$j]]['pay_amount'];
$res[$company_id][$p_account][$v['relation_game_id']]['all_pay_amount']= $allgame[$v['relation_game_id']]['pay_amount'];
} else {
// $res[$company_id][$v[$j]]['ratio_pay_amount'] = $res[$company_id][$v[$j]]['pay_amount'];
$res[$company_id][$p_account][$v['relation_game_id']]['all_pay_amount']= $game[$v['relation_game_id']]['pay_amount'];
}
// $res[$company_id][$p_account][$v['relation_game_id']]['all_pay_amount']= $game[$v['relation_game_id']]['pay_amount'];
$res[$company_id][$p_account][$v['relation_game_id']]['game_type_name'] = $this->getGameTypeName($v['relation_game_id']);
}
}
@ -1291,7 +1305,7 @@ class CompanyStatementSetController extends Controller {
unset($tmpp);
$this->getPuPromoteSpend($pc,array_unique(array_keys($pc)),$begintime,$endtime);
$StatementDb = M("CompanyStatement","tab_");
$statement_begin_time = date("Y.m.d",$begintime);
$statement_end_time = date("Y.m.d",$endtime);