|
|
|
|
@ -126,7 +126,7 @@ async def get_all(
|
|
|
|
|
res = OverhaulActivityRead(
|
|
|
|
|
id=equipment.id,
|
|
|
|
|
material_cost=float(cost),
|
|
|
|
|
service_cost=float(service_cost),
|
|
|
|
|
service_cost=equipment.service_cost,
|
|
|
|
|
overhaul_cost=float(oh_cost),
|
|
|
|
|
location_tag=equipment.location_tag,
|
|
|
|
|
equipment_name=equipment.master_equipment.name if equipment.master_equipment else None,
|
|
|
|
|
@ -175,7 +175,7 @@ async def get_standard_scope_by_session_id(*, db_session: DbSession, overhaul_se
|
|
|
|
|
|
|
|
|
|
results = []
|
|
|
|
|
material_cost = await get_cm_cost_summary(collector_db=collector_db, last_oh_date=prev_oh_scope.end_date, upcoming_oh_date=overhaul.start_date)
|
|
|
|
|
service_cost = get_service_cost(scope=overhaul.maintenance_type.name, total_equipment=len(eqs))
|
|
|
|
|
#service_cost = get_service_cost(scope=overhaul.maintenance_type.name, total_equipment=len(eqs))
|
|
|
|
|
overhaul_cost = await get_oh_cost_summary(collector_db=collector_db, last_oh_date=prev_oh_scope.end_date, upcoming_oh_date=overhaul.start_date)
|
|
|
|
|
|
|
|
|
|
for equipment in eqs:
|
|
|
|
|
@ -184,7 +184,7 @@ async def get_standard_scope_by_session_id(*, db_session: DbSession, overhaul_se
|
|
|
|
|
res = OverhaulActivityRead(
|
|
|
|
|
id=equipment.id,
|
|
|
|
|
material_cost=float(cost),
|
|
|
|
|
service_cost=float(service_cost),
|
|
|
|
|
service_cost=equipment.service_cost,
|
|
|
|
|
overhaul_cost=float(oh_cost),
|
|
|
|
|
location_tag=equipment.location_tag,
|
|
|
|
|
equipment_name=equipment.master_equipment.name if equipment.master_equipment else None,
|
|
|
|
|
|