shish 5 år sedan
förälder
incheckning
ce5aa9f6bc
1 ändrade filer med 4 tillägg och 0 borttagningar
  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']);
                 $shopIds = ShopService::getShopIds($data['sjId']);
                 foreach ($shopIds as $shopId) {
                 foreach ($shopIds as $shopId) {
                     $data['shopId'] = $shopId;
                     $data['shopId'] = $shopId;
+                    //不是当前门店不增加库存
+                    if ($currentShopId != $shopId) {
+                        $data['stock'] = 0;
+                    }
                     $res = self::add($data);
                     $res = self::add($data);
                     if ($stock > 0 && $res && $currentShopId == $shopId) {
                     if ($stock > 0 && $res && $currentShopId == $shopId) {
                         //有库存数量,增加盘盈记录 2021.7.9 linqh
                         //有库存数量,增加盘盈记录 2021.7.9 linqh