Added a user setting to automatically add missing products to the shopping list (closes #1266)

This commit is contained in:
Bernd Bestel
2022-04-03 13:00:14 +02:00
parent 34859ada02
commit a5294262e6
7 changed files with 56 additions and 3 deletions

View File

@@ -498,6 +498,11 @@ class StockService extends BaseService
$this->CompactStockEntries($productId);
if (boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_auto_add_below_min_stock_amount_to_shopping_list')))
{
$this->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_auto_add_below_min_stock_amount_to_shopping_list_id')));
}
return $transactionId;
}
else