InvoiceyDocs
How Invoicey works

Statuses

How drafts become issued, paid, overdue or cancelled.

Invoicey stores facts—when an invoice was issued, cancelled, and which payment allocations are active—and derives its status whenever it is read. Time can therefore make an unpaid invoice overdue without a nightly status job.

Status at a glance

Display statusCzechWhen it applies
draftNávrhNot issued; editable and deletable
futureBudoucíIssued with a future issue date
unpaidNezaplacenoIssued, unpaid and not past due
overduePo splatnostiIssued, unpaid and past due
paidZaplacenoFully covered by active allocations
cancelledStornovánoCancelled; its number remains consumed

Priority is cancelled → draft → paid → future → overdue → unpaid. A future invoice never appears overdue, even when its due date was entered earlier than today.

Payment coverage also exposes a finer payment state on the invoice: unpaid, partial, paid, or overpaid. Partial and overpaid never rewrite the issued document — they only change how much is still outstanding.

Domain status vs. display status

Automation returns both status and displayStatus. The domain status keeps future, unpaid and overdue under issued; the display status is the finer label shown in lists and filters.

How it is derived

function deriveStatus(invoice, now) {
  if (invoice.cancelledAt) return "cancelled";
  if (!invoice.issuedAt) return "draft";
  if (invoice.paidAt) return "paid"; // set when allocations fully cover the total
  if (invoice.issueDate > today(now)) return "future";
  return now > endOfDay(invoice.dueDate, "Europe/Prague")
    ? "overdue"
    : "unpaid";
}

The due date is a calendar date. An invoice due 2026-05-17 becomes overdue only after that day ends in Europe/Prague, not at midnight UTC.

Actions and outcomes

ActionAllowed fromResult
Savenew or draftdraft
Issuedraftnumbered and immutable
Mark paid / confirm allocationopen issued invoiceallocation; paid when fully covered
Unmark / reverseallocated invoiceprojections recomputed
Cancelissued invoicecancelled
Deletedraft onlypermanently removed
Duplicateany statusnew draft

issued → overdue is not a user action. Time passes and the result changes.

Bank match proposals are suggestions only until you confirm them.

Why issued invoices are frozen

After issue, the PDF may be in a client's inbox, the ISDOC in accounting software and a payment in flight against its variable symbol. Editing the database copy would silently make those artifacts disagree.

Use one of the auditable paths instead:

  • Wrong client, amount or date: cancel and re-issue.
  • Correction after accounting: issue a credit note, then a corrected invoice.

The cancelled document keeps its number, so the sequence still explains itself during an audit.