Invoice numbering sounds like a detail — until an audit. Let's look at what the law actually requires (it is widely misunderstood) and what fakts adds on top.

What the law actually requires

The core requirement is simple: an invoice needs a unique sequential number based on one or more series that identifies it unambiguously. This comes from the EU VAT Directive (2006/112/EC), Article 226(2): “a sequential number, based on one or more series, which uniquely identifies the invoice.”

In Latvia this is reinforced by Cabinet Regulation No. 877 (the bookkeeping rules): a document's number must contain at least the ordinal number of that document type. You may number documents by type, and you may run several parallel series.

The “no gaps” myth

You will often hear that numbering must be unbroken, with not a single number skipped, and that this is a VID requirement. The Directive and Regulation No. 877 do not require that — the words “consecutive” or “gapless” do not appear. A cancelled or spoiled invoice that leaves a gap is acceptable, as long as you can explain it and you keep the cancelled document.

Why gaps still look bad

Even when a gap is legal, it raises questions in an audit: “where did invoice No. 47 go?” A clean, unbroken sequence is simply easy to defend and needs no explanation. That is why many businesses choose to keep one voluntarily.

What fakts adds

fakts keeps numbering gapless by choice — a guarantee that goes beyond the legal minimum. Technically it is enforced with row-level locking (SELECT … FOR UPDATE) on a dedicated series per company, per year. That means even two invoices issued at the same instant never get the same number and never skip one — the sequence stays clean and predictable, resetting at the start of each year.