/api/packing/reports/missingWhat is still owed (PK-6)
The night's "what do we still owe people", asked at either end of the shift.
when=after — ordered vs actually packed. Unambiguous: both sides are order lines. This is the sheet the shipping team works from.
when=before — ordered vs what the floor has produced (production records plus the night bake log), to predict the shortfall before picking starts.
Only shortfalls appear — a report of everything the bakery got right is not a report anyone reads at 4am. missing floors at zero per item, so an over-supply of one item can never mask a shortfall on another.
shape=section regroups exactly the rows shape=total returns, and still carries rows, so a caller never has to ask twice.
⚠️ productionLive is false when the day has no production record and no logged bake — which today is always, because the platform has no recipes and no productions yet. When it is false the numbers mean "not yet made", not "short": the screen and the printed sheet both say so (PK-4). There is also an unresolved unit question — recipes output base items while orders are for variants — so production counts only where a recipe's output item IS the ordered item. Revisit when the floor goes live.
A 400 is returned: Invalid input — the error string says what was wrong. A 401 is returned: Not authenticated. Sign in first (see the Auth tag). A 500 is returned: Unexpected server error.