po_revise
Reopen a sent purchase order as a draft for editing, preserving received/billed quantities, and ensuring re-send passes an approval gate.
Instructions
Revidiere eine gesendete Bestellung (sent -> draft, die Revise-Kante): snapshots the current header + lines into po_revision (append-only, H-AUDIT), increments revision, and re-opens the PO as a draft for editing via po_upsert. received_qty and billed_qty survive untouched (they belong to receipts/matches). The re-send rides the P8-gated po_send, so a revision can never leak to the supplier without the dial. Only a SENT PO is revisable (draft/received/closed/cancelled -> invalid_transition). Idempotent: a replay yields one snapshot + one increment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poId | Yes | ||
| actor | No | ||
| reason | No | ||
| workspaceId | Yes | ||
| idempotencyKey | No |