Fix: Calculate prices
This commit is contained in:
parent
2af766a8b3
commit
2cdf7e8688
@ -30,7 +30,7 @@ def calculate_prices(period_id: uuid.UUID, db: Session):
|
||||
ingredients = set(db.execute(select(distinct(RecipeItem.product_id))).scalars().all())
|
||||
issued_products = get_issue_prices(item, ingredients - recipes, db)
|
||||
left = ingredients - recipes - issued_products.keys()
|
||||
purchased_products = get_issue_prices(item, left, db)
|
||||
purchased_products = get_purchase_prices(item, left, db)
|
||||
left -= purchased_products.keys()
|
||||
rest = get_rest(left, db)
|
||||
prices = issued_products | purchased_products | rest
|
||||
|
Loading…
Reference in New Issue
Block a user