Missing Invoice Numbers: Testing Sequence Gaps
Why invoice numbering gaps draw questions from auditors and tax authorities, how to test a sequence, and how to document legitimate voids.
Editorial disclosure: Pyalm publishes and maintains the products and free tools discussed on this site. Regulatory statements are linked to primary sources where applicable. No independent professional review is claimed unless a reviewer is explicitly named.
Every tax invoice should have a unique, sequential number. When an auditor — or a tax authority — sees INV-0104 followed by INV-0107, the obvious question is: where are 105 and 106? The answer should be on file before anyone asks.
Why sequence matters
Sequential numbering is a completeness control. If every invoice number is accounted for, you know every sale was recorded. A gap might mean:
- A voided draft or a cancelled invoice (innocent, if documented).
- A test document that was issued by mistake.
- An invoice issued but never booked — revenue and VAT missing from the books.
- An invoice deleted after the fact — a red flag.
In the UAE, tax invoices are expected to carry a sequential number that uniquely identifies them, so the test is relevant to VAT compliance as well as the audit. See UAE electronic invoice mandatory fields for what a valid invoice includes.
Testing a sequence
- Export the list of invoice numbers for the period from your system (include credit notes separately).
- Split by series — INV, CN, quotation prefixes and per-year prefixes are separate sequences.
- Sort and find gaps — compare each number with the previous one.
- Find duplicates — the same number used twice, which is worse than a gap.
- Explain each gap — match it to a voided document, a cancelled invoice or a credit note.
Doing this by hand in Excel is error-prone with mixed prefixes. The free Invoice Sequence Gap Finder separates series by prefix, shows missing numbers as ranges (preserving leading zeros), lists duplicates and exports the findings. It runs in your browser, so the list never leaves your device.
Gaps vs duplicates
| Finding | Meaning | Action |
|---|---|---|
| Missing number | Document not in the list | Find it — voided? Unbooked? Deleted? |
| Duplicate number | Same number used twice | Check which is the genuine invoice; fix the numbering control |
| Out of date order | Number issued after a later number's date | Possible backdating; ask why |
Documenting voids properly
A voided or cancelled invoice should never be silently deleted. Keep the document, mark it VOID with the date, the reason and the person who authorised it, and file it with the sequence. If an issued invoice is wrong, correct it with a credit note and a new invoice, so the numbering trail stays intact.
A developer's warning
Systems that generate numbers from a database sequence can create gaps on rollback — a failed transaction consumes a number that is never used. Gap-free numbering takes deliberate design. If you build your own invoicing, read building an invoicing system: money and tax pitfalls.
Fewer places for a gap to appear
Hand-numbered Word or Excel invoices are the usual source of gaps and duplicates. Raising tax invoices, credit notes and receipts from one sales cycle in an accounting system removes most of the problem — Pyalm Books does this and is free during beta. Pair the test with a duplicate payment test for a fuller completeness review.
Standards, rates and deadlines change. Confirm the current position with the relevant authority or a qualified adviser before you rely on it.