You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Included recipe "sandwich" (Base servings = 1, 1 serving per base serving of parent)
Ingredient "Toast" 2 Tins
Ingredient "Tomato" 0.25 Pieces
So when consuming 1 serving of "Ham sandwich" the expectation is that this products will be consumed:
25 Grams "ham"
2 Tins "Toast"
0.25 Pieces "Tomato"
=> ✅ That's the case, regardless of if consuming from the /recipes or /mealplan page.
When consuming 2 servings of "Ham sandwich" the expectation is that this products this will be consumed:
50 Grams "ham"
4 Tins "Toast"
0.5 Pieces "Tomato"
=> ✅ That works when consuming from the /recipes page.
=> ❌ When consuming from the /mealplan page the amount of the nested recipe ("sandwich") ingredients are related to 1 serving only (and this then also affects calories and price calculations).
The text was updated successfully, but these errors were encountered:
Thanks, I think I found where the logic error is (although I don't have it in code yet)
Basically, if a recipe is created with an item before a QU conversion is in place, it will not properly update that recipe when the QU conversion is added, unless the offending ingredient is removed and re-added to the recipe. So I removed bacon from the recipe in my example, re-added it, and now it's calculating properly.
if a recipe is created with an item before a QU conversion is in place, it will not properly update that recipe when the QU conversion is added
Still needs a reproducible example and I doubt it, QU conversions (and everything else) are of course always taken / calculated "live", nothing is saved at recipe level based on the state of that point in time when the recipe or an ingredient was created/added (would make not that much sense).
Sorry, I did not have time to test more. I found that if you add another layer to the nested recipe, only the first two layers are in the calculations in the Meal plan. For that, I added Ham Cheese Sandwich, which is the recipe for Ham Sandwich (which is the recipe for Sandwich + the ingredient Ham) + the ingredient Cheese. In the recipe overview, the calculations are correct, but in the Meal plan, only the ingredients from layers 1. and 2. are in the calculations; the "sandwich" part is missing.
Demo instance: https://test-6yannembxwfbehixjot1v8.demo-prerelease.grocy.info/mealplan?start=2023-10-22
Recipe/ingredients hierarchy:
So when consuming 1 serving of "Ham sandwich" the expectation is that this products will be consumed:
=> ✅ That's the case, regardless of if consuming from the /recipes or /mealplan page.
When consuming 2 servings of "Ham sandwich" the expectation is that this products this will be consumed:
=> ✅ That works when consuming from the /recipes page.
=> ❌ When consuming from the /mealplan page the amount of the nested recipe ("sandwich") ingredients are related to 1 serving only (and this then also affects calories and price calculations).
The text was updated successfully, but these errors were encountered: