Merge branch 'feature/promote_order_settle_check' of wmtx/platform into release

功能上线
master
廖金灵 4 years ago committed by Gogs
commit e0bf902246

@ -605,7 +605,7 @@ class CompanyStatementPoolController extends ThinkController
//周结算金额计算 //周结算金额计算
for ($i=0;;$i++) { for ($i=0;;$i++) {
if ($sv[$i]['sum_money']) { if ($sv[$i]['sum_money']) {
$game_data['week_amount'] += $sv[$i]['sum_money']- $sv[$i]['withhold']; $game_data['week_amount'] += $sv[$i]['sum_money']- $sv[$i]['withhold']+$sv[$i]['reward']-$sv[$i]['fine'];
$game_data['withhold_amount'] += $sv[$i]['withhold']; $game_data['withhold_amount'] += $sv[$i]['withhold'];
$game_data['fine'] += $sv[$i]['fine']; $game_data['fine'] += $sv[$i]['fine'];
$game_data['reward'] += $sv[$i]['reward']; $game_data['reward'] += $sv[$i]['reward'];
@ -1705,6 +1705,10 @@ class CompanyStatementPoolController extends ThinkController
$amount = 0; $amount = 0;
$statement_amount = 0; $statement_amount = 0;
$statement_lack_amount = 0; $statement_lack_amount = 0;
$reward = 0;
$fine = 0;
$lreward = 0;
$lfine = 0;
foreach ($increment_ratio as $key => $value) { foreach ($increment_ratio as $key => $value) {
@ -1720,6 +1724,7 @@ class CompanyStatementPoolController extends ThinkController
$statement_data = $model->where(['id'=>$key])->find(); $statement_data = $model->where(['id'=>$key])->find();
$statement_info = json_decode($statement_data['statement_info'],true); $statement_info = json_decode($statement_data['statement_info'],true);
foreach ($statement_info as $k => $v) { foreach ($statement_info as $k => $v) {
@ -1745,6 +1750,7 @@ class CompanyStatementPoolController extends ThinkController
$statement_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; $statement_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold'];
} else { } else {
$statement_lack_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; $statement_lack_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold'];
} }
} }
@ -1753,7 +1759,16 @@ class CompanyStatementPoolController extends ThinkController
$statement_info_data = json_encode($statement_info); $statement_info_data = json_encode($statement_info);
$model->where(['id'=>$key])->save(['statement_info'=>$statement_info_data,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]); $r_data = $model->field("fine,reward")->where(['id'=>$key])->find();
if($model == M("company_statement_info","tab_")) {
$reward += $r_data['reward'];
$fine += $r_data['fine'];
} else {
$lreward += $r_data['reward'];
$lfine += $r_data['fine'];
}
$model->where(['id'=>$key])->save(['statement_info'=>$statement_info_data,'statement_money'=>$amount+($r_data['reward']?$r_data['reward']:0)-($r_data['fine']?$r_data['fine']:0),'pay_amount'=>$amount,'remark'=>$remark[$key]]);
$amount = 0; $amount = 0;
@ -1762,7 +1777,7 @@ class CompanyStatementPoolController extends ThinkController
} }
M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount,'lack_statement_money'=>$statement_lack_amount]); M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]);
$this->ajaxReturn(['status'=>1,'info'=>'保存成功']); $this->ajaxReturn(['status'=>1,'info'=>'保存成功']);

@ -23,7 +23,7 @@ class FinancialSummaryController extends AdminController
public function index($p=1) public function index($p=1)
{ {
if(!array_key_exists("year",$_REQUEST) || !array_key_exists("type",$_REQUEST)){ if(!array_key_exists("year",$_REQUEST) || !array_key_exists("type",$_REQUEST)){
$this->redirect(ACTION_NAME, array('year' => date('Y',time()),"type"=>2)); $this->redirect(ACTION_NAME, array('year' => date('Y',time()),"type"=>3));
} }
if(!IS_ROOT){ if(!IS_ROOT){
$this->OpAuthList= getModuleControllerAuth(); $this->OpAuthList= getModuleControllerAuth();

@ -810,9 +810,9 @@ class TimingController extends AdminController {
} }
// //
if (isset($return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']])) { if (isset($return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']])) {
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?$v['sum_money']:0; $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?($v['sum_money']-($v['withhold']?$v['withhold']:0)):0;
} else { } else {
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?$v['sum_money']:0; $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?($v['sum_money']-($v['withhold']?$v['withhold']:0)):0;
} }
} }

@ -466,6 +466,11 @@
withhold = 0; withhold = 0;
$(_this).parent().parent().find(".withhold").val(withhold); $(_this).parent().parent().find(".withhold").val(withhold);
} }
if (!oldwithhold ) {
oldwithhold = 0;
$(_this).parent().parent().find(".oldwithhold").val(oldwithhold);
}
// else if(parseFloat(withhold) > parseFloat(pay_money)) { // else if(parseFloat(withhold) > parseFloat(pay_money)) {
// withhold = pay_money; // withhold = pay_money;
// $(_this).parent().parent().find(".withhold").val(withhold); // $(_this).parent().parent().find(".withhold").val(withhold);
@ -509,7 +514,7 @@
} }
} }
var D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold); var D_value = parseFloat(old_amount)-parseFloat(this_amount) + parseFloat(withhold-oldwithhold);
week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2)); week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2));

@ -471,6 +471,11 @@
withhold = 0; withhold = 0;
$(_this).parent().parent().find(".withhold").val(withhold); $(_this).parent().parent().find(".withhold").val(withhold);
} }
if (!oldwithhold ) {
oldwithhold = 0;
$(_this).parent().parent().find(".oldwithhold").val(oldwithhold);
}
// else if(parseFloat(withhold) > parseFloat(pay_money)) { // else if(parseFloat(withhold) > parseFloat(pay_money)) {
// withhold = pay_money; // withhold = pay_money;
// $(_this).parent().parent().find(".withhold").val(withhold); // $(_this).parent().parent().find(".withhold").val(withhold);
@ -514,7 +519,7 @@
var this_amount = week_amount_find.find(".sum_money_span").text(); var this_amount = week_amount_find.find(".sum_money_span").text();
var D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold) ; var D_value = parseFloat(old_amount)-parseFloat(this_amount) + parseFloat(withhold-oldwithhold) ;
week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2)); week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2));
// week_amount_find.find(".week_amount_input").val((parseFloat(week_amount)-D_value- parseFloat(withhold))); // week_amount_find.find(".week_amount_input").val((parseFloat(week_amount)-D_value- parseFloat(withhold)));

@ -72,9 +72,9 @@
</div> </div>
<div class="input-list input-list-resway search_label_rehab"> <div class="input-list input-list-resway search_label_rehab">
<select id="type" name="type" class="select_gallery" style="width:150px;"> <select id="type" name="type" class="select_gallery" style="width:150px;">
<option value="2" <if condition="I('type') && I('type') eq 2">selected
</if> >不包含绑币</option>
<option value="3" <if condition="I('type') && I('type') eq 3">selected <option value="3" <if condition="I('type') && I('type') eq 3">selected
</if> >不包含绑币</option>
<option value="2" <if condition="I('type') && I('type') eq 2">selected
</if> >包含绑币</option> </if> >包含绑币</option>
</select> </select>
</div> </div>

Loading…
Cancel
Save