Request
The operations lead at Moorhaven Repair needs a repeatable stock report. Raw SKU codes contain surrounding spaces and mixed case. Movement quantities are signed. Reservations are already canonical.
Result
Deliver reusable functions and a final report with total available units and sorted low-stock SKU codes. Keep each completed function as you add the next one.
Moorhaven Repair needs one inventory report from movement rows and open reservations. You will build it in six steps while keeping the functions you wrote earlier. Start with SKU normalization, then aggregate signed movements, subtract reservations, identify low stock and assemble a deterministic report. The source from each completed step becomes the next starting point. The final check calls the whole path on new fixtures, so helpers must agree about normalization and empty results. There are no real customers or live inventory here. Every record is fictional. A negative movement is a return or correction, and an oversubscribed SKU has zero available units rather than a hidden negative quantity in the final availability view.
Normalize edge whitespace and case.