edit-admin-add_pay_log
This commit is contained in:
@@ -840,6 +840,11 @@ class Orders extends HD_Controller
|
||||
$adimn_count = $this->app_liche_orders_model->count(['o_id'=>$row['id'],'type'=>6,'status'=>1]);//车款订单
|
||||
if(!$last_pay_count && ($money!=$money_json['price_book'] || $adimn_count)){ //若首笔金额 == 定金金额,尾款订单不要置为 -1若金额 > 定金金额 或者 非首笔,尾款订单置为 -1
|
||||
$this->app_liche_orders_model->update(['status'=>-1],['o_id'=>$row['id'],'type'=>3]); //尾款更新成无效订单
|
||||
}else{
|
||||
$last_noppay_row = $this->app_liche_orders_model->get(['o_id'=>$row['id'],'type'=>3,'status'=>0]);//未支付尾款订单
|
||||
if($last_noppay_row){
|
||||
$this->app_liche_orders_model->update(['total_price'=>$last_noppay_row['total_price']-$money],['id'=>$last_noppay_row['id']]);
|
||||
}
|
||||
}
|
||||
}else{ //服务费
|
||||
// if($money>$srv_price){
|
||||
|
||||
Reference in New Issue
Block a user