Kirin 1 سال پیش
والد
کامیت
276cd5b853
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      app/admin/controller/store/StoreProduct.php

+ 1 - 1
app/admin/controller/store/StoreProduct.php

@@ -441,7 +441,7 @@ class StoreProduct extends AuthController
             ['bar_code', 20],
             ['in_stock', 0],
         ]);
-        if ($where['in_stock'] < 1) return app('json')->fail('补货数量不能少于1');
+        if ($where['in_stock'] < 0.001) return app('json')->fail('补货数量不能少于0.001');
         $info = StoreProductAttrValue::alias('a')->join("StoreProduct b", "a.product_id=b.id", "left")->where('a.type', 0)->where('a.bar_code', $where['bar_code'])->field('a.price,a.unique,a.stock as in_stock,a.product_id,b.store_name,b.image,a.bar_code')->find();
         if (!$info) return app('json')->fail('商品条形码不存在');
         $info = $info->toarray();