Document Statuses.
Every document status in InvoiceScript, valid transitions, and what each status means.
Document Statuses
For: developers and bookkeepers who need the exact status definitions and transition rules.
Status definitions
| Status | Description | Document number? | Editable? |
|---|---|---|---|
| draft | Document created, not yet finalized. | No (temporary draft code) | Yes |
| sent | Finalized and delivered to the customer. | Yes (immutable) | No |
| partially_paid | One or more payments recorded, balance remaining. | Yes | No |
| paid | Full amount received. | Yes | No |
| overdue | Past the due date without full payment. | Yes | No |
| cancelled | Voided. Document number preserved. | Yes (preserved) | No |
Status availability by document type
| Status | Invoice | Credit Note | Quote | Pro-Forma |
|---|---|---|---|---|
| draft | ✓ | ✓ | ✓ | ✓ |
| sent | ✓ | ✓ | ✓ | ✓ |
| partially_paid | ✓ | ✓ | : | : |
| paid | ✓ | ✓ | : | : |
| overdue | ✓ | ✓ | : | : |
| cancelled | ✓ | ✓ | ✓ | ✓ |
Quotes and pro-formas are non-binding. They do not accept payments and cannot reach partially_paid, paid, or overdue statuses.
Valid transitions
| From | To | Trigger |
|---|---|---|
| draft | sent | Finalize and send |
| draft | (deleted) | Delete draft |
| sent | partially_paid | Record partial payment |
| sent | paid | Record full payment |
| sent | overdue | Due date passes (automatic) |
| sent | cancelled | Cancel document |
| partially_paid | paid | Record remaining payment |
| partially_paid | sent | Delete all payments |
| partially_paid | overdue | Due date passes (automatic) |
| partially_paid | cancelled | Cancel document |
| overdue | partially_paid | Record partial payment |
| overdue | paid | Record full payment |
| overdue | cancelled | Cancel document |
| paid | partially_paid | Delete a payment (balance returns) |
Notes
Cancelled is terminal. A cancelled document cannot be un-cancelled. The document number is preserved and the gap in your sequence is documented.
Overdue is automatic. InvoiceScript checks due dates and marks overdue documents when the due date passes. The transition happens on page load, not via a background job.
Deleting payments reverses status. If you delete a payment on a paid invoice and the remaining total is less than the invoice amount, the status reverts to partially_paid or sent.
Deleting documents
Only draft documents can be deleted. Drafts have no document number and are not part of your official financial records.
Once a document is finalized (any status other than draft), it cannot be deleted. Finalized documents can only be cancelled. The document number is preserved in the sequence. This is intentional: legal and tax authorities require that invoice number sequences remain unbroken. A gap in your invoice numbers could trigger an audit finding.
If you made a mistake on a finalized invoice, issue a credit note to correct it rather than attempting to delete the original.
Deleted drafts are soft-deleted (moved to trash) and excluded from all lists and reports. They are not permanently destroyed. A future maintenance command will support permanent deletion with foreign key safety checks.
Related pages
Ready to build?
One-time purchase. Self-hosted. Own every file forever.