|
|
|
|
@ -396,7 +396,7 @@ class SparepartManager:
|
|
|
|
|
sparepart_id = requirement.sparepart_id
|
|
|
|
|
needed_quantity = requirement.quantity_required
|
|
|
|
|
sparepart_name = requirement.sparepart_name
|
|
|
|
|
unit_cost = requirement.avg_cost
|
|
|
|
|
unit_cost = requirement.avg_cost if requirement.avg_cost > 0 else requirement.unit_cost
|
|
|
|
|
|
|
|
|
|
current_stock = adjusted_stocks.get(sparepart_id, 0)
|
|
|
|
|
|
|
|
|
|
@ -968,7 +968,7 @@ ORDER BY lss.asset_location, lss.itemnum;""")
|
|
|
|
|
lead_time=float(req_record.avg_leadtime_months),
|
|
|
|
|
sparepart_name=req_record.item_description,
|
|
|
|
|
unit_cost=float(req_record.avg_unit_cost),
|
|
|
|
|
avg_cost=float(req_record.avgcost)
|
|
|
|
|
avg_cost=float(req_record.avgcost or 0)
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
equipment_requirements[req_record.asset_location].append(requirement)
|
|
|
|
|
|