MCPcopy
hub / github.com/IBM/AssetOpsBench / get_workorder_actuals_vs_planned

Function get_workorder_actuals_vs_planned

src/servers/wo/main.py:176–186  ·  view source on GitHub ↗

Estimated vs actual hours and cost variance for a work order.

(
    wonum: str, site_id: str
)

Source from the content-addressed store, hash-verified

174
175
176async def get_workorder_actuals_vs_planned(
177 wonum: str, site_id: str
178) -> Union[ActualsVsPlannedResult, ErrorResult]:
179 """Estimated vs actual hours and cost variance for a work order."""
180 res = await wo.get_workorder_actuals_vs_planned(db(), wonum, site_id)
181 err = _failed(res)
182 if err:
183 return err
184 return ActualsVsPlannedResult.model_validate(
185 {**res["data"], "message": f"Actuals vs planned for {wonum}."}
186 )
187
188
189async def get_workorder_kpis(

Callers

nothing calls this directly

Calls 2

dbFunction · 0.85
_failedFunction · 0.85

Tested by

no test coverage detected