From 703356cc3cf0a92567d91b167826a4c0f4d810d8 Mon Sep 17 00:00:00 2001 From: lewis <604446095@qq.com> Date: Thu, 6 Mar 2025 17:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=9F=A5=E8=AF=A2=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/lists/store_product/StoreProductLists.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/lists/store_product/StoreProductLists.php b/app/admin/lists/store_product/StoreProductLists.php index d1201c4ce..de7a7cdbf 100644 --- a/app/admin/lists/store_product/StoreProductLists.php +++ b/app/admin/lists/store_product/StoreProductLists.php @@ -138,9 +138,9 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa $category = StoreCategory::where('id', 'in', [$item['top_cate_id'], $item['two_cate_id'], $item['cate_id']])->column('name'); $item['cate_name'] = implode('/', $category); if ($is_warehouse == 1) { - $item['stock'] = WarehouseProductStorege::where('product_id', $item['id'])->sum('nums'); + $item['stock'] = WarehouseProductStorege::where('product_id', $item['id'])->where('warehouse_id', 1)->sum('nums'); } else { - $nums = WarehouseProductStorege::where('product_id', $item['id'])->sum('nums'); + $nums = WarehouseProductStorege::where('product_id', $item['id'])->where('warehouse_id', 1)->sum('nums'); $item['stock'] = bcadd($nums, $stock); } if ($userShip == 4) {