The stored status records real transitions. 'Viewed' is stamped the first time the customer opens their portal link. 'Overdue' is not stored at all — effectiveStatus computes it whenever due_date has passed and a balance remains, so the list is always correct without a cron flipping rows.
Also called: overdue invoices · did the customer open it · unpaid invoices · invoice statuses
- 1Send stamps status='sent' and sent_at via /api/invoices/[id]/send.
- 2The customer opening the portal link calls markInvoiceViewed, flipping sent to viewed and stamping viewed_at.
- 3Recording a payment sets partial or paid and stamps paid_at when the balance clears within half a cent.
- 4effectiveStatus(inv) derives 'overdue' at render time from due_date + balance.
Overdue is the status a builder most needs to be right, and it is the one most easily broken by a nightly job that quietly fails to run — the invoices stay marked current and nobody chases them. Overdue is now worked out at the moment the list is drawn, from the due date and the balance still owing, so it is correct whether or not anything ran overnight. Draft, sent, viewed, partial and paid are recorded as they actually happen.
- No visibility into whether a sent invoice was ever opened.
- Overdue state going stale because a scheduled job did not run.
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →