E141: Delete receipt
DELETE /api/work-order-receipts/:id
Removes a WO receipt and reverses its inventory effects on both ledgers. Triggered from Work Order Detail receipts section.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
No body.
Response — 200 OK
{ "deletedId": "uuid" }
Echo of the deleted receipt's id. Writes reverse ledger entries (REVERSE_CONSUME, REVERSE_PRODUCE) and re-runs the cost recompute.
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such receipt. |
| 409 | invalid_transition | Receipt's produced FG has already been consumed by a downstream SO shipment (would create a negative balance after reversal). |
Workflow
Calls W141 Delete receipt.