Delete an invoice that should never have existed

Hide an invoice from every list, total and portal link — while the row survives privately with its reason so the gap can still be explained.

What it is

A soft delete for misfires: a duplicate, an invoice created on the wrong project, a test invoice. It disappears from the builder's lists and reporting and its portal link stops working, but the record is retained with delete_reason and deleted_by so an accountant can answer 'what happened to 0055?'. It can be restored.

Also called: remove a duplicate invoice · delete invoice · created on the wrong project · test invoice

See it
Delete an invoice that should never have existed
Prepared for
Ivy Brubaker
1140 Ridge Line Rd · Fair Play
Shell package$31,868
Concrete & site$9,252
Doors & windows$6,168
Trim & finish$4,112
Total
$51,400
Signature
The delete dialog with its four quick-pick reasons ('Duplicate — created twice by mistake', 'Created on the wrong project'…) and the blurb about the record being kept privately. src/components/invoices/InvoiceCorrectionDialog.tsx. Sample data — no customer information appears here.
How it works
  1. 1listInvoices filters deleted_at IS NULL by default, so every caller — lists, totals, reporting — sees it as gone.
  2. 2The server refuses to delete an invoice with payments recorded against it.
  3. 3A restore action clears deleted_at, delete_reason and deleted_by.
  4. 4A separate hard-delete path exists for drafts only, gated behind typing the word DELETE.
Why we built it

Some invoices should never have existed at all — a duplicate, or a draft raised against the wrong job — and leaving them on the list as cancelled just clutters the record. Deleting hides the invoice from every list and every total, while the row survives underneath with its reason attached, so a question about a missing number still has an answer. An invoice that was sent is a document that existed in the world; erasing the record of it is how books stop reconciling.

The problem
  • Mistaken invoices permanently polluting lists and reporting.
  • Hard deletion destroying the audit trail behind a number gap.
Sound familiar?
What you get
Gone from every screen and every total, immediately.
Still explainable months later, with the reason attached.
Reversible if it was deleted in error.

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 →