|
|
|
@ -765,7 +765,9 @@ class CompanyStatementSetController extends Controller {
|
|
|
|
|
|
|
|
|
|
$game['sum_money']=round($game['pay_amount']*$tratio*(100-$fax_ratio)/(100*100),2);//结算金额=平台总额*(分成比例+补点比例)*(1-税费费率)
|
|
|
|
|
$add_data['statement_money'] += $game['sum_money'];
|
|
|
|
|
$add_data['statement_info'][] = $game;
|
|
|
|
|
if ($game['pay_amount'] != '0') {
|
|
|
|
|
$add_data['statement_info'][] = $game;
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
// dd($t_game_ratio);
|
|
|
|
|
for ($i=0; $i < count($t_game_ratio); $i++) {
|
|
|
|
@ -808,7 +810,9 @@ class CompanyStatementSetController extends Controller {
|
|
|
|
|
}
|
|
|
|
|
$temp_game['sum_money']=round($temp_game['pay_amount']*$tratio*(100-$fax_ratio)/(100*100),2);//结算金额=平台总额*(分成比例+补点比例)*(1-税费费率)
|
|
|
|
|
$add_data['statement_money'] += $temp_game['sum_money'];
|
|
|
|
|
$add_data['statement_info'][] = $temp_game;
|
|
|
|
|
if ($temp_game['pay_amount'] != '0') {
|
|
|
|
|
$add_data['statement_info'][] = $temp_game;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -874,7 +878,7 @@ class CompanyStatementSetController extends Controller {
|
|
|
|
|
$is_continue = false;
|
|
|
|
|
$statement_data = $add_data['statement_info'];
|
|
|
|
|
foreach ($statement_data as $skey => $sval) {
|
|
|
|
|
if ($sval['game_list']) {
|
|
|
|
|
if ($sval) {
|
|
|
|
|
$is_continue = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1054,8 +1058,9 @@ class CompanyStatementSetController extends Controller {
|
|
|
|
|
* 返回结算流水类型
|
|
|
|
|
*/
|
|
|
|
|
public function getTurnoverType($relation_game_id = 0, $company_id = 0, $begin_time = 0, $end_time = 0){
|
|
|
|
|
|
|
|
|
|
$company_belong = M("promote_company","tab_")->field("company_belong")->where(['id'=>$company_id])->find();
|
|
|
|
|
$turnover_where = [
|
|
|
|
|
"company_belong"=>$company_belong['company_belong'],
|
|
|
|
|
"relation_game_id"=>$relation_game_id,
|
|
|
|
|
"company_id"=>$company_id,
|
|
|
|
|
"_string"=>"begin_time <={$end_time} AND ( end_time = 0 OR end_time >= {$begin_time})"
|
|
|
|
@ -1064,7 +1069,6 @@ class CompanyStatementSetController extends Controller {
|
|
|
|
|
//判断特殊比例是否存在,存在直接返回结算流水类型
|
|
|
|
|
if (!$turnover_type) {
|
|
|
|
|
|
|
|
|
|
$company_belong = M("promote_company","tab_")->field("company_belong")->where(['id'=>$company_id])->find();
|
|
|
|
|
//判断公司内外团类型是否存在,不存在直接返回0
|
|
|
|
|
if (!$company_belong) {
|
|
|
|
|
return 0;
|
|
|
|
|