Update dispatch pipeline docs

This commit is contained in:
2026-09-16 16:25:54 +05:30
parent 02c673328e
commit c8f86163f7
@@ -160,9 +160,11 @@ enters any edits the agent made into the system and submits.
Confirmed PO that already has a linked Invoice: should the Invoice be voided automatically? Confirmed PO that already has a linked Invoice: should the Invoice be voided automatically?
If the PO's items were already pulled into a loading sheet: what happens to those loading sheet If the PO's items were already pulled into a loading sheet: what happens to those loading sheet
items? Cascade rules needed before implementation. items? Cascade rules needed before implementation.
4. **Exact adjustment payload for `POST /api/invoices/{id}/finalize`** — the fields the office 4. ~~**Exact adjustment payload for `POST /api/invoices/{id}/finalize`**~~ — **Resolved**, see
worker can edit (returns, damage, discounts) are assumed but not fully specified. "Free issues" [order_invoice_lifecycle.md Open Question 6](./order_invoice_lifecycle.md#open-questions):
handling (items given to the shop at no charge) is a known case needing its own payload field(s). `items[]` (`deliveredQuantity` + `freeQuantity` per line), `returns[]` (reusing the
`SaleReturn`/`CreditNote` shape from `18_returns_claims.md`, `Damaged` as a `ReasonCode` rather
than a separate field), and a single invoice-level `discount`.
5. **Stage 3 and Stage 4 ordering** — Invoice printing (Stage 3) and loading sheet population 5. **Stage 3 and Stage 4 ordering** — Invoice printing (Stage 3) and loading sheet population
(Stage 4) are independent flows. They are not strictly sequential — both depend on a Confirmed (Stage 4) are independent flows. They are not strictly sequential — both depend on a Confirmed
PO existing but neither requires the other to complete first. PO existing but neither requires the other to complete first.