diff --git a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php index 008adf9c1..b9f27d13b 100644 --- a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php +++ b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php @@ -122,7 +122,7 @@ class BeforehandOrderCartInfoLogic extends BaseLogic if($order['outbound_id']>0){ $wp= WarehouseProduct::where('oid',$order['outbound_id'])->where('product_id',$find['product_id'])->where('financial_pm',0)->find(); if($wp){ - $wp->update(['price'=>$params['purchases'],'total_price'=>$total_price]); + $wp->save(['price'=>$params['purchases'],'total_price'=>$total_price]); $wp_total_price=WarehouseProduct::where('oid', $order['outbound_id'])->where('financial_pm',0)->sum('total_price'); WarehouseOrder::where('id', $order['outbound_id'])->update(['total_price' => $wp_total_price]); }