Merge pull request '优化毛利计算' (#406) from feature/more_payment into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/406
master
廖金灵 3 years ago
commit 8b14d3c3b0

@ -373,12 +373,14 @@ class GameMarginSetController extends Controller {
}else{
$ratio = $val['second_ratio'];
}
$statement_money = round( $this->adddata[$game]['pay_amount'] / $val['pay_amount'] * $val['sum_money'],2);
if( array_key_exists("cp_statement_amount",$this->adddata[$game]) ){
$this->adddata[$game]['cp_statement_amount'] += $statement_money;
}else{
$this->adddata[$game]['cp_statement_amount'] = $statement_money;
}
$statement_money = round( $this->adddata[$game]['pay_amount'] * $ratio / 100,2);
$this->adddata[$game]['cp_statement_amount'] = $statement_money;
// $statement_money = round( $this->adddata[$game]['pay_amount'] / $val['pay_amount'] * $val['sum_money'],2);
// if( array_key_exists("cp_statement_amount",$this->adddata[$game]) ){
// $this->adddata[$game]['cp_statement_amount'] += $statement_money;
// }else{
// $this->adddata[$game]['cp_statement_amount'] = $statement_money;
// }
$this->adddata[$game]['cp_promote_ratio'] = $val['promote_ratio'];
$this->adddata[$game]['cp_ratio'] = $ratio;
}

Loading…
Cancel
Save