Seed additional products, improve left rail, improve search box, add visuals to buttons, rename working documents to working docs and improve left rail nav
This commit is contained in:
@@ -27,7 +27,7 @@ def calculate_raw_material_cost(raw_material: RawMaterial, price: RawMaterialPri
|
||||
|
||||
|
||||
def get_active_price(raw_material: RawMaterial) -> RawMaterialPriceVersion | None:
|
||||
active_prices = [price for price in raw_material.price_versions if price.status == "active"]
|
||||
active_prices = [price for price in raw_material.price_versions if price.status == "active" and price.market_value > 0]
|
||||
if not active_prices:
|
||||
return None
|
||||
active_prices.sort(key=lambda item: item.effective_date, reverse=True)
|
||||
|
||||
Reference in New Issue
Block a user