From e02537be9b3c7d62cd6441e1aa8806934a0908c5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 2 Dec 2021 16:56:29 +0800 Subject: [PATCH] * Fix bug #17050. --- module/product/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/model.php b/module/product/model.php index 6e0c1a4b16..0776982ac8 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1027,7 +1027,7 @@ class productModel extends model ->orWhere('t2.PM')->eq($this->app->user->account) ->markRight(1) ->fi() - ->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi() + ->beginIF($branch !== '' and $branch !== 'all')->andWhere('t1.branch')->in($branch)->fi() ->andWhere('t2.deleted')->eq('0') ->orderBy($orderBy) ->fetchAll('id');