Merge pull request '新增判断结算包名' (#407) from feature/more_payment into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/407
master
廖金灵 4 years ago
commit 05dd251fec

@ -373,14 +373,14 @@ class GameMarginSetController extends Controller {
}else{ }else{
$ratio = $val['second_ratio']; $ratio = $val['second_ratio'];
} }
$statement_money = round( $this->adddata[$game]['pay_amount'] * $ratio / 100,2);
$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_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_promote_ratio'] = $val['promote_ratio'];
$this->adddata[$game]['cp_ratio'] = $ratio; $this->adddata[$game]['cp_ratio'] = $ratio;
} }
@ -393,7 +393,7 @@ class GameMarginSetController extends Controller {
{ {
$where = [ $where = [
"partner_id"=>$company_id, "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(); $game = M("Game","tab_")->field("relation_game_name")->where($where)->group("relation_game_name")->select();
if($game){ if($game){

Loading…
Cancel
Save