新增判断结算包名

master
chenzhi 3 years ago
parent c5c2f7fee3
commit 91585e6ed4

@ -373,14 +373,14 @@ class GameMarginSetController extends Controller {
}else{
$ratio = $val['second_ratio'];
}
$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;
// }
$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;
}
@ -393,7 +393,7 @@ class GameMarginSetController extends Controller {
{
$where = [
"partner_id"=>$company_id,
"_string"=>"original_package_name = '{$OPName}' OR relation_game_name = '{$OPName}'"
"_string"=>"( original_package_name = '{$OPName}' AND select_package_name = 0 ) OR ( relation_game_name = '{$OPName}' AND select_package_name = 1 )"
];
$game = M("Game","tab_")->field("relation_game_name")->where($where)->group("relation_game_name")->select();
if($game){

Loading…
Cancel
Save