W101: Get materials inventory summary
Returns current on-hand and on-order quantities per material and location, computed from the ledger. Triggered from the Materials Inventory page.
Steps
-
Aggregate from the ledger. Call
MaterialsInventory.getSummary(filters), which returns rows of{ materialId, locationId, onHand, onOrder }. -
Batch-hydrate names. Resolve material and location names in single batched calls for the UI.
Returns
Aggregated { materialId, locationId, onHand, onOrder } rows with names hydrated.
Business rules
- Computed on demand, no cache. No materialized view today. If the page gets slow, the aggregation moves to a DB view at L1 without changing this workflow's contract.
Errors
None.