diff --git a/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php b/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php index 2309fcf9d..9ddcf05ff 100644 --- a/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php +++ b/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php @@ -69,7 +69,8 @@ class SystemStoreStorageLogic extends BaseLogic $find->save(['status'=>1,'staff_id'=>$params['staff_id']??0,'admin_id'=>$params['admin_id']??0,'mark'=>'入库时间:'.date('Y-m-d H:i:s',time())]); $branch_product=StoreBranchProduct::where(['product_id'=>$find['product_id'],'store_id'=>$find['store_id']])->find(); if($branch_product){ - $branch_product->save(['stock'=>$branch_product['stock']+$find['nums']]); + $branch_product->stock=$branch_product['stock']+$find['nums']; + $branch_product->save(); SqlChannelLog('StoreBranchProduct', $branch_product['id'], $find['nums'], 1,Request()->url(),$admin_id); }else{ $storeProduct = StoreProduct::where('id', $find['product_id'])->findOrEmpty();