unpost_document
Reverse a posted invoice, bill, voucher, or credit note back to open state for editing. Void any applied payments first; otherwise the reversal is refused.
Instructions
Reverse a posted customer invoice, vendor bill, employee voucher, or credit note (each keeps its type through the round-trip).
Deletes the posting transaction and lot, and clears the invoice's posted-state metadata. The invoice returns to "open" state and can be edited or re-posted. Refuses if the invoice has any payments applied — void payments first, then unpost.
Args: id: Document ID (e.g., "000001"). document_type: "invoice", "bill", "voucher", or "credit_note" — disambiguates when IDs collide. party_type: Owner side, credit notes only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| party_type | No | ||
| document_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |