Write off document
write_off_documentWrite off the unpaid rest of a sales invoice that will not be paid (bad debt), as the app's Write off on the invoice does: the outstanding amount goes to the write-off account, the VAT on it is reversed, and the invoice is locked. The write-off is always dated today, so its VAT reversal lands in the current open period; there is no date to choose. Without confirm true it changes nothing and answers reason confirm-required naming the amount, the account and the date; ask the user, then call again with confirm true. Refuses a quote or other non-invoice (not-an-invoice), a void invoice, one already written off (unchanged), one marked settled, one with nothing outstanding, one with a bank payment waiting for the owner's confirm (payment-pending), an invoice dated after today (invalid-date), and books locked through today (locked-period). A missing or another business's id is not-found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The sales invoice to write off, from list_invoices or get_document. | |
| confirm | No | Send true only after the user has agreed to the write-off the refusal described. |