市场结算管理bug修正

master
zhengyongxing 5 years ago
parent bd9af09830
commit a140a4c9d5

@ -808,7 +808,7 @@ class TimingController extends AdminController {
// var_dump($desposit);die(); // var_dump($desposit);die();
$payway_spend = M()->table("({$spend}) spend") $payway_spend = M()->table("({$spend}) spend")
->field("sum(pay_amount) as pay_amount,pay_time,promote_id,game_name,game_id,relation_game_id,pay_way,sdk_version") ->field("sum(pay_amount) as pay_amount,pay_time,promote_id,game_name,game_id,relation_game_id,pay_way,sdk_version,market_admin_id")
->where($map) ->where($map)
->group("pay_time,promote_id,game_name,pay_way,market_admin_id") ->group("pay_time,promote_id,game_name,pay_way,market_admin_id")
->select(); ->select();
@ -862,13 +862,13 @@ class TimingController extends AdminController {
//将时间、推广员id、游戏名、设备类型作为键值标记渠道费用 //将时间、推广员id、游戏名、设备类型作为键值标记渠道费用
if (!$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]) { if (!$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]) {
if (!$value['pay_way']) { if (!$value['pay_way']) {
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']] = 0; $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']] = 0;
} }
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']] $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']]
= $value['pay_amount'] * ($pay_rate[$value['pay_way']]/100); = $value['pay_amount'] * ($pay_rate[$value['pay_way']]/100);
} else { } else {
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']] $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']]
= $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]+($value['pay_amount'] * ($pay_rate[$value['pay_way']]/100)); = $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']]+($value['pay_amount'] * ($pay_rate[$value['pay_way']]/100));
} }
} }
@ -907,7 +907,7 @@ class TimingController extends AdminController {
//下游流水 //下游流水
$promote_data[$key]['promote_amount'] = $value['pay_amount'] * ($promote_radio * 0.01); $promote_data[$key]['promote_amount'] = $value['pay_amount'] * ($promote_radio * 0.01);
//渠道费用 //渠道费用
$promote_data[$key]['channel_amount'] = $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]; $promote_data[$key]['channel_amount'] = $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['admin_id']];
$tax = 0; $tax = 0;
//公司税费 //公司税费
foreach($tax_radio as $k => $v) { foreach($tax_radio as $k => $v) {

Loading…
Cancel
Save