shish 5 лет назад
Родитель
Сommit
ce5aa9f6bc
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      biz-ghs/product/classes/ProductClass.php

+ 4 - 0
biz-ghs/product/classes/ProductClass.php

@@ -909,6 +909,10 @@ class ProductClass extends BaseClass
                 $shopIds = ShopService::getShopIds($data['sjId']);
                 foreach ($shopIds as $shopId) {
                     $data['shopId'] = $shopId;
+                    //不是当前门店不增加库存
+                    if ($currentShopId != $shopId) {
+                        $data['stock'] = 0;
+                    }
                     $res = self::add($data);
                     if ($stock > 0 && $res && $currentShopId == $shopId) {
                         //有库存数量,增加盘盈记录 2021.7.9 linqh