This commit is contained in:
mkm 2023-11-16 15:42:39 +08:00
parent ccb4b1489a
commit 62b5044d33

View File

@ -2355,10 +2355,8 @@ class ProductRepository extends BaseRepository
}
if ($orderProduct->is_imported == 0) {
$stockIn=$orderProduct['product_num'];
ProductAttrValue::where('mer_id', $merId)
->where('product_id', $product['product_id'])
->update(['stock' => $attrValue->stock + $stockIn]);
$attrValue->update(['stock' => $attrValue->stock + $stockIn]);
$product->stock = $stockIn + $product->stock;
$data = [
'order_id' => $params['order_id'] ?? 0,
'order_product_id' => $params['order_product_id'] ?? 0,