From 8ab511361a6ba47e6dcd872fccea1123b69f1d8e Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Wed, 27 Apr 2022 22:50:20 +0200 Subject: [PATCH] Do "auto add missing products to shopping list" also on product open actions (fixes #1873) --- services/StockService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/StockService.php b/services/StockService.php index 9e75e49b..731e5c78 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -1075,6 +1075,11 @@ class StockService extends BaseService } } + if (boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount'))) + { + $this->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'))); + } + return $transactionId; }