-
-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: The price of recipes (in the meal plan) is incorrect when ingredients are not in stock #1771
Comments
Sorry, I had missed the part of the price only being based on the items in stock since I was too focused on the calories and price part at the end of each ingredient line. I have created a demo to show the issue with the products displaying a price in the meal plan https://test-749d2cyz3acukwjg0246eo.demo.grocy.info/mealplan?start=2022-01-30. The pizza and the headers of the days do show the correct price of $0.00 however the cucumber and cheese show their last recorded price. Edit: I'm not sure how the week costs at the top of the meal plan is calculated |
Pizza is a recipe, Cucumber and Cheese are products. Recipe prices are based on in-stock ingredients only. Products show always the last price on the meal plan, regardless if in-stock or not - also since it's possible to add single products to the meal plan. Each in-stock item of the same product could theoretically have a different price, so showing one of them on the meal plan without knowing which one exactly you plan to use would be random. And I doubt that it's practically really necessary to be able to plan the 5 cent more expensive Cucumber to be used on Tuesday, while eating the cheaper one on Wednesday. Yes, your week costs are inaccurate by that, but grocy is here to manage your fridge, not your business.
By summarizing all recipes and products of the corresponding week, no rocket science involved.
Localization / regional settings problem: The demo meal plan starts on Sunday, but the server behind and everything related is based on German regional settings (where the week starts on Monday). That doesn't fit and lead to recipes/products from Mondays and/or Sundays to not be properly included in week costs. Known theoretical problem, no practical problem, since on your personal installation, you define the settings to fit your locale. References #516 and #214. The demo is just a demo. |
Just a cross-reference here to #779 about that recipe costs ore currently based on in-stock ingredients only:
|
If you look at the meal plan in the demo https://demo-prerelease.grocy.info/mealplan?start=2022-01-30 you can check the price for the pizza and spaghetti Bolognese and see the cost of these meals only contain the items in stock. This issue seem to be a bug of the recipes themselves which becomes noticeable in the meal plan. (The pancakes item on Thursday however seems to be an exception to this case and I cannot figure out when looking at the recipe why the dish is so expensive. This would be a different bug. )
I did notice that any product added to the meal plan uses the latest(?) known price in the meal plan costs even when not in stock. I would like this to be the same case for the recipes.
The text was updated successfully, but these errors were encountered: