Back to Blog
Guides6 min read

Deleting a Client Doesn't Touch Their Invoices

IN
Invoice Generator TeamAuthor
October 12, 2026Published
Also available in:NederlandsDeutsch

Deleting a saved client is a one-line database operation: the client's row is removed, and the endpoint returns success. It sounds like it should be more consequential than that, given how much can reference a client in an active workspace — invoices, payments, comments, portal links. The reason it isn't is a structural decision that runs through the whole product: a saved client record is a convenience, not a source of truth that anything else depends on.

Invoices Don't Reference Clients — They Copy Them

When you create an invoice from a saved client, the client's billing details are copied, as text, straight into the invoice's own stored data at that moment. There's no foreign key from an invoice back to the client record it came from — the invoices table has no client ID column at all. Once that copy is made, the invoice and the client record it originated from have no ongoing structural relationship; the invoice's "bill to" field is now just text that happens to have started out identical to what the client record contained at the time. This is why deleting the client afterward genuinely cannot cascade into the invoice: there's no reference for the deletion to follow, because none was ever stored.

What Actually Does Get Deleted or Detached

That said, not everything referencing a client is left alone — a few things are genuinely tied to the client record by a real foreign key, and deleting that record does affect them, in two different ways depending on how each relationship was defined. Client portal links are deleted outright along with the client: the portal-tokens table's link to a client is set to cascade on delete, so every portal link you'd generated for that client stops existing the moment the client record does — there's no client left for a portal link to represent, so the link goes with it. Document comments, expense records, and time entries associated with the client behave differently: their link to the client is set to null rather than cascading, so a comment a client left on an invoice, or an expense you'd tagged with that client, survives the deletion but loses its client attribution going forward.

Why Invoices Specifically Were Designed This Way

Storing a copy rather than a reference is what makes an invoice a reliable historical document in the first place. An invoice is legally and practically meant to represent exactly what was billed to exactly whom, as it stood at the time it was sent — not a live view that changes retroactively if the underlying client record is later edited or removed. If invoices referenced clients by ID instead of copying their details, editing a saved client's billing address would silently rewrite the "bill to" field on every invoice ever sent to them, including ones from months or years ago that a client, an accountant, or an auditor might need to match against what was actually communicated at the time. Decoupling the two avoids that entirely: editing or deleting a client only ever affects the client record and the small set of things genuinely tied to it, never the historical invoices that happened to be created from it.

What This Means If You're Cleaning Up Your Client List

In practice, this makes deleting a saved client a low-stakes cleanup action rather than something to approach cautiously. Removing a client you no longer work with doesn't touch a single invoice in your history, doesn't affect any report that totals up what that client has paid or owes (those reports match invoices to clients by comparing stored text, not by ID, so they keep working off the invoice data directly), and won't retroactively change anything a client has already seen. The one thing worth checking before deleting a client is whether you'd generated a portal link for them that's still in active use — that link stops working immediately as a direct consequence, since there's a real cascade behind it, even though every document the link used to show remains completely intact and reachable through other means afterward.

Related Articles

Guides6 min read

How Business Profile Defaults Fill In New Invoices

Your business profile fills in your details, currency, tax rate, payment terms, and design on new blank invoices only. It never changes invoices you've already started, and only workspace admins can edit it.

IN
Invoice Generator TeamOctober 26, 2026
Guides5 min read

What Your Client Receives When You Email an Invoice

The email is a short summary with the invoice number, issue date, due date, and total. It doesn't attach the PDF or include a link, and it comes from a no-reply address, so it helps to know what to send with it.

IN
Invoice Generator TeamOctober 22, 2026
Guides6 min read

What Happens to Invoices You Create Without an Account

Without an account, saved invoices are kept in your browser's local storage, not on our servers. They aren't copied into an account when you sign up, and signing out of an account on that browser clears them.

IN
Invoice Generator TeamOctober 20, 2026
Guides6 min read

Why Editing an Invoice Doesn't Update a Share Link You Already Sent

A share link stores a copy of the invoice as it was when you created the link. Later edits change your saved invoice, but anyone opening the old link still sees the old version, and so does the QR code on a re-downloaded PDF.

IN
Invoice Generator TeamOctober 18, 2026
Guides6 min read

What Happens When You Convert an Estimate to an Invoice

Converting doesn't turn the estimate into an invoice in place — it creates a brand-new invoice with a new ID and marks the original estimate as converted, permanently linking the two in both directions.

IN
Invoice Generator TeamOctober 10, 2026
Guides6 min read

How Bulk "Mark as Paid" Actually Works

Selecting invoices and marking them paid in bulk doesn't edit a status field directly — it records an actual payment for whatever's still outstanding on each one, because a hand-edited status would get silently overwritten otherwise.

IN
Invoice Generator TeamOctober 8, 2026

Mastered Invoicing?

Put your knowledge into practice and create your first professional invoice today.

Create Your Invoice Now
Deleting a Client Doesn't Touch Their Invoices | Invoice Generator