Engineering
Why We Generate Invoices From a Report — Not From a Separate Invoices App
Invoice from time is usually sold as a second product. You track hours in one tab. You open Invoices in another. Somewhere a customer list starts to drift from the timesheet, an unpaid column appears, and Friday becomes a reconciliation hobby. That architecture survives a demo. It dies the first week a freelancer needs a PDF that still matches the week they actually looked at.
MinuteShark generates the invoice from the report. What × Who × When first. Chart and table second. Generate Invoice third: pick a cost profile (or type rates once), pull line items from time, add extras, named tax, export PDF, DOCX, or CSV. This post is why we refused a standalone invoices module — not a tour of every letterhead field, and not an accounts-receivable product we do not ship.
The product bet: an invoice is a document off a query you already understood. If Friday’s PDF cannot name the same What, Who, and When you used to think about the week, you will edit the letter until it is fiction. The report is the thinking surface. The invoice is the letter you send. They should share a parent.
Why a standalone invoices module lies by Tuesday
Independent work does not fail at invoicing because people hate PDFs. It fails because two databases disagree. Hours live on tasks. Money lives in a mini-ledger that was copied once and then hand-edited. A separate Invoices app almost always grows three hacks, all of them bad.
- Clone the customer. “Acme” in the tracker and “Acme Inc.” in invoices, because the billing tab wanted a legal name the catalog did not have. Reports’ What dimension and the PDF now argue about who the week belonged to.
- Edit hours on the invoice only. You shave 0.4h off a line so the client will not ask a question. The task still holds 0.4h. Next month’s report and last month’s PDF cannot both be true.
- Type the rate in the document and nowhere else. Trackers that watch budget against cost have nothing honest to consume. You have a pretty letter and a vibes-based burn rate. We already refused a rate-on-user column for the same reason: a nickname is not a rule.
Enterprise suites can afford that split. Freelancers cannot. Primary ICP is independents, not departments. If Friday requires a collections dashboard, you need accounting software. If Friday requires a letter that still matches the week, you need a pipeline: query, then document.
What the pipeline actually is in the app
On the client, MinuteShark is an Ionic + Angular 16 app. Capacitor 7 wraps the same workspace on iOS and Android. The catalog and the time entries live in Firebase (Auth, Firestore, Functions). Chart.js draws the report as a thinking surface — What (clients or projects, optional tasks) × Who (users or teams) × When (date range). After you generate: a grand total, a BILLABLE rounded total if rounding is on, a chart plus a table, pivots, previous/next period. Stripe is seat billing for ElementPragma on the web — a different money object from what a client owes you.
Generate Invoice is a verb on that result. You pick a cost profile — named billable and internal rates per user and/or team, currency as free text — or you enter rates manually for the one-off you do not want to immortalize. Invoice number is a hint in YYYYMMDD form, not a fake ERP sequence. You can invoice by date, client, project, task, user, or team; group dates; set logo plus company and client blocks; keep line items from time; add additional flat or hourly lines; reorder; attach named tax percentages with optional cumulative stacking (GST/QST, VAT); write notes and a footer. Then you export CSV, PDF, or DOCX with the boring libraries for the job: jsPDF, docx, xlsx. The reports guide is the customer map of the query. The billable rates guide is the map of the pointer. This article is why those maps share a parent object.
The document is downstream of honest hours
Time is tracked on a task. Workspace → Client → Project → Task → Subtask. Roll-ups are views. If you invoice a project total, you are still summing leaves. That is load-bearing. A Jira key is a terrible line item because the client does not live in your tracker. A report that can pivot by task, then become a letter the client can read, is the opposite move: coarse enough to send, detailed enough to defend.
Rounding is not an invoice feature. Original duration stays on the time entry. BILLABLE is a rounded view — off by default, rounds up, presets at 6 / 15 / 30 minutes or custom. Rounded totals on a report include the full rounded value for entries that started in range even if they cross midnight. The invoice inherits that view. It should not invent a third duration. The time rounding guide is the habit; the schema is “never overwrite the minutes you actually worked.”
Generate Invoice is a verb on a report, not a second database
CSV, Excel, and JSON already come off the same generated result for humans who asked for a file. The invoice is the client-facing sibling of that file, not a ledger that slowly replaces it. If you need to change a line, change the week you trust — then generate the letter. Silent AI rewrite of either is not a feature. MinuteShark AI can open Reports with filters. It does not invent an invoice in chat, and it does not change entries until you confirm a card.
That is why we refused a pretty in-app invoice widget that is not a document. If the report cannot become a file a client can open, it is a demo. If the invoice cannot name the query, it is fan fiction with a logo.
Why the cost profile sits after Generate — not on the timer
The play button should not know what Northwind pays. A running timer holds elapsed time, start time, task/project/client. Money is a rule you pick while you are still calm: Standard 2026, Retainer — Northwind, Rescue rate. Admin configures profiles. User wins if both a user rate and a team rate exist. Trackers that watch estimate, budget, or revenue on one project or one task point at the same rule. Invoices and risk emails should not invent a third copy of $150.
Manual rates on an invoice still exist because reality includes a one-time rescue. The named rule is the default. The escape hatch is labeled. Extra flat or hourly lines exist because licenses and tools should not be buried in an hourly rate — that is a commercial habit we already wrote. The engineering constraint is the same: extras are document lines, not mutated time entries.
What we left out on purpose
No “mark paid in QuickBooks.” No aging report. No dunning sequence. This is invoice generation from time, not full AR. Fewer integrations than enterprise tools is honest; custom development exists when a specialized consulting workflow needs a bridge. We do not claim a public developer API as a self-serve Standard checkbox. Enterprise can include application customization, custom branding, and onboarding — that is a conversation, not a hidden invoices microservice.
Workspaces stay isolated: one digital office does not share clients, projects, or user pools with another. Cloud sync means the same report and profile are available on web, iOS, and Android; subscription management stays on the web. SOC2 Type II, ISO27001, encryption, backups: the invoice is still a document about people you already invited. It is not idle detection or a screenshot of anyone’s desktop.
How we tell if the pipeline is working
- Can a consultant generate last week (What × Who × When), trust the table, then produce a PDF without retyping the hours?
- Does the letter use the same cost profile a tracker would use at 50% of cost?
- If they reprint Thursday, do they pick the profile they actually used — not whoever the user record currently claims to be?
- Can extras (a license, a rush line) sit on the document without rewriting Implementation?
If the answer depends on maintaining a second customer list named Invoices, we shipped a ledger hobby. A report that becomes a letter is slower to explain on day one and faster every Friday after that. Time data should help you think. An invoice module that slowly replaces the timesheet is not thinking. It is archaeology with a pay button we do not have.