Skip to content
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

Recipe costs: Use last price for out of stock ingredients #779

Closed
kriddles opened this issue Apr 21, 2020 · 2 comments
Closed

Recipe costs: Use last price for out of stock ingredients #779

kriddles opened this issue Apr 21, 2020 · 2 comments
Milestone

Comments

@kriddles
Copy link
Contributor

The recipe costs currently displayed are based on the last price for a product however the consume would be based on "First expiring first, then first in first out" which maybe a different price.

When I initially made the view products_oldest_price it only took into account the current stock information, however if there is no current stock then it should pull the last purchased price.

@Bonerserk
Copy link

I Often need to know how much a recipe will cost before cooking it and then I'll buy missing ingredients.
Now the default price rule is "the default consume rule which is Opened first, then first due first, then first in first out".
If an ingredient is out of stock, its price isn't added to the total receipe price.
It would be great to use the last ingredient price or the average price for the not in stock ingredients so the rule will be "Opened first, then first due first, then first in first out, then average price".

@berrnd berrnd added this to the vNEXT milestone Feb 8, 2022
@berrnd berrnd changed the title Recipe Costs switch to default consume logic Recipe costs: Use last price for out of stock ingredients Feb 8, 2022
@berrnd
Copy link
Member

berrnd commented Feb 8, 2022

Out of stock items are not included in recipes costs since v3.0.0.

Before the change that recipe costs are based on the default consume rule, all prices were based on the corresponding products last price.

Let's change again that for out of stock ingredients, the last price is used again. I think that reflects current recipe costs best - will be done for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants