mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Add an option per recipe to not check against the shopping list when adding missing recipe ingredients, only against stock (closes #154)
This commit is contained in:
@@ -38,6 +38,11 @@ class RecipesService extends BaseService
|
||||
$product = $this->Database->products($recipePosition->product_id);
|
||||
|
||||
$toOrderAmount = ceil(($recipePosition->missing_amount - $recipePosition->amount_on_shopping_list) / $product->qu_factor_purchase_to_stock);
|
||||
if ($recipe->not_check_shoppinglist == 1)
|
||||
{
|
||||
$toOrderAmount = ceil($recipePosition->missing_amount / $product->qu_factor_purchase_to_stock);
|
||||
}
|
||||
|
||||
if($toOrderAmount > 0)
|
||||
{
|
||||
$shoppinglistRow = $this->Database->shopping_list()->createRow(array(
|
||||
|
Reference in New Issue
Block a user