Invoices that can explain every amount

How Doktally turns time entries, fixed fees and retainers into invoice lines that can always be traced back, recalculated and corrected without losing the original numbers.

The problem

Every freelancer and small agency knows the moment: a client asks "where does this €8,400 come from?" and the answer lives in three places at once, a timesheet, a spreadsheet with rates and an email about a discount. Invoicing tools usually store only the final amount. Once the invoice is issued, the reasoning behind it is gone.

For a business that bills time, fixed fees and monthly retainers, that is not only awkward. It leads to double billing, forgotten hours and corrections that overwrite history.

How Doktally solves it

Every automatically generated invoice line keeps its source: which time entries, contract, fee or recurring charge produced it, for which period, at which rate.

An invoice line that shows the agreed fee and the adjustment

Each client gets these documents in their own language (item names, VAT wording, footer), whatever language you use the app in, and missing translations are flagged before issuing.

Issued invoices are never edited. A mistake is fixed with a credit note that references the original invoice and carries its own reason, in the client's language.

A credit note linked to the invoice it corrects

Under the hood

Doktally is split into Spring Boot services behind a gateway. The invoice service owns billing sources and reservations; documents are stored in MongoDB; Keycloak handles identity; background work runs over RabbitMQ.

flowchart LR
  T[Time entries] --> B[Billing engine]
  C[Contracts and fees] --> B
  R[Recurring charges] --> B
  B --> L[Invoice line + source]
  L --> I[Invoice]
  I --> CN[Credit note]

The key design choice: a billing source is a first-class record, not a comment on the invoice line. New billing models (retainers, recurring charges, billable expenses) plug into the same mechanism instead of getting their own invoicing code.

The result

Every amount on an invoice can be explained in one click, corrected without rewriting history and checked against the work that produced it. For a business owner that means fewer awkward client conversations and an accountant who trusts the numbers.

Technologies

Java, Spring Boot, MongoDB, Angular, Billing