unreceive_purchase_order
Remove receive line entries from a purchase order to reverse received stock, using exact IDs, product quantities with LIFO, or full removal.
Instructions
[LEGACY IMMEDIATE WRITE — HIGH RISK: BYPASSES INFLOW_ENABLE_SAFE_WRITES] Use set_purchase_order_receipts instead. Remove receive line entries from a PO to reverse received stock. Supports exact ID removal, product-based LIFO removal, or full unreceive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | Products to unreceive by quantity — auto-matches receive lines newest-first | |
| dryRun | No | Preview what would be removed without making changes | |
| unreceiveAll | No | Remove ALL receive lines (fully unreceive the entire PO) | |
| receiveLineIds | No | Specific receive line IDs to remove entirely | |
| purchaseOrderId | Yes | The purchase order ID |