Loading articleโฆ
Loading 4weirdโฆ
Loading 4weirdโฆ
Loading articleโฆ
DocsInvoicing
Docs ยท remastery wave 1
The full B2B invoicing suite: a client directory with billing details, draft โ sent โ paid lifecycle, vector PDF export for clients, and a 30-day soft-delete trash with 1-click restore and auto-purge countdown.
Clients
Invoice clients hold name, email, address, phone, and VAT number per user. Every invoice points at one client, and line items carry description, quantity, unit rate, total, and position โ so the PDF renders exactly what the database says.
invoice INV-1042 โ draft
$100.00Safety net
Deleting an invoice sets deleted_at instead of removing the row. Trashed invoices sit in a Trash tab with an auto-purge countdown; restore clears deleted_at in one click, and after 30 days the row purges permanently. Active lists always filter deleted_at IS NULL โ the index on (user_id, deleted_at) keeps both views fast.
๐๏ธ Soft delete
deleted_at timestamps the moment; nothing is ever hard-deleted by hand.
โฉ๏ธ 1-click restore
Clear the timestamp and the invoice rejoins the active list with history intact.
โณ Auto-purge
30-day countdown, then permanent purge โ the trash cannot fill forever.
Flow
Worked example
A two hour sprint becomes a paid invoice with no retyping: track, convert, address, send, export, settle.
Lifecycle
Invoices move forward through states; only trash moves them sideways. Learn the five so a status badge never confuses you.
| State | What it means | Allowed next moves |
|---|---|---|
| draft | Editable working copy, invisible to the client. | Edit freely, then send or trash. |
| sent | Issued to the client, awaiting value. | Mark paid, mark overdue, cancel, or trash. |
| paid | Value landed and reconciled. | Terminal: kept for the books, never edited. |
| overdue | Past due date while still unpaid. | Nudge the client, then paid or cancelled. |
| cancelled | Voided in place, kept for audit. | Terminal: trash handles removal instead. |
FAQ
Ownership, trash timing, and the plain-English companion guide.
Can a squad lead read my invoices?
No. Invoices and clients are owner-scoped and line items inherit through the parent invoice. No squad role can cross that boundary.
How long does trash keep an invoice?
Thirty days with a visible auto-purge countdown, then permanent purge. Restore any time inside the window with one click and history stays intact.
PDF or database: which is truth?
The database row. The vector PDF is a render generated per export, so regenerating after an edit always reflects the current row.
Is there a plain-English version?
Yes: invoicing and trash, in plain English covers the live memoranda flow plus the planned upgrades in everyday language.
Troubleshooting
Four fixes for the most common invoice surprises. All are local data checks, never permission escalations.
Converted draft shows zero lines
The tracker had no unbilled entries for that project and period. Log hours first, confirm they appear as unbilled, then convert again.
PDF totals differ from memory
Regenerate after any edit: the export renders the live row. Stale downloads from before a correction are the usual mismatch.
Restore button missing
You are looking at the active list, not the Trash tab. Switch tabs to see the countdown and the one-click restore control.
Client cannot open the PDF
Re-export and resend: the file is a standard vector document with no viewer lock-in. Confirm the client record holds the right email before resending.