优化毛利计算

master
chenzhi 4 years ago
parent 1e2d8035a2
commit c5c2f7fee3

@ -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