diff --git a/brewman/brewman/routers/calculate_prices.py b/brewman/brewman/routers/calculate_prices.py index c6c51325..292557be 100644 --- a/brewman/brewman/routers/calculate_prices.py +++ b/brewman/brewman/routers/calculate_prices.py @@ -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