Merge pull request 'refactor(admin): 优化仓库产品价格更新逻辑' (#283) from dev into main
Reviewed-on: https://gitea.lihaink.cn/mkm/multi-store/pulls/283
This commit is contained in:
commit
2ec21746eb
@ -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]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user