v1
Materials
Materials

Void Po Group

Void an entire PO — the order should never have been placed.

Distinct from cancel_po_group_remainder, which keeps what arrived and only releases the outstanding balance. This says the whole order was a mistake: entered against the wrong project, duplicated, or cancelled with the vendor after goods had already been booked in.

ALL OR NOTHING ON THE GUARDS, ITEM BY ITEM ON THE WRITES. Every item is checked before any of them is touched, so a PO with one consumed line does not half-void and leave the shop reconciling a partial reversal by hand. The writes themselves are per item and each is independently committed — there is no transaction spanning them — so a failure mid-way is reported with the exact items that did and did not reverse rather than being swallowed.

Reuses _void_one_item_purchase per item, so the reversal is identical to the single-item path: negative receiving_log line, offsetting qc_log entry, state back to 'sel' with the PO number cleared, and the linked tasks re-evaluated.

NO 'cancelled' qs_state EXISTS. The column's CHECK constraint allows needs/sent/opts/sel/approval/po/purch only, so "cancelled" is expressed the way cancel_po_group_remainder already expresses it — items revert to 'sel' with po_number cleared, and the void_purchase event on each item's state_history is the record that this PO was voided rather than withdrawn.

Body: { reason: str (required), force?: bool }

post/api/v1/materials/po-groups/{po_number}/void

Request

  • Base URL: https://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.jeevyfabrication.com/api/v1/materials/po-groups/{po_number}/void
  • Auth: none declared

Path parameters

po_numberstring required

Request body

object required

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.