fix admin add_paylog

This commit is contained in:
lccsw
2022-09-07 16:44:31 +08:00
parent 5108683f15
commit babb9d9cef
@@ -850,8 +850,10 @@ class Orders extends HD_Controller
$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]);//未支付尾款订单
$pay_ck = $this->app_liche_orders_model->sum('pay_price',['o_id'=>$row['id'],'type in (1,6)'=>null,'status'=>1]);//已支付车款
if($last_noppay_row){
$this->app_liche_orders_model->update(['total_price'=>$last_noppay_row['total_price']-$money],['id'=>$last_noppay_row['id']]);
$cj_money = $car_price-($money+$pay_ck['pay_price']);
$this->app_liche_orders_model->update(['total_price'=>$cj_money],['id'=>$last_noppay_row['id']]);
}
}
}else{ //服务费