Invoice numbering in Morocco: rules for a continuous sequence
Invoice numbering in Morocco: why it must be continuous and chronological, which number formats to choose and how to avoid gaps and duplicates in your sequence.
Why numbering is a serious matter
The invoice number seems trivial, but it is one of the first things examined during an audit. A continuous sequence proves that every invoice issued has been recorded. Conversely, a gap in the numbering immediately raises a question: where is the missing invoice, and was the corresponding revenue declared?
The general rule is simple: each invoice receives a unique number, assigned in the chronological order of issue, with no interruptions or duplicates. Number 145 cannot be dated before number 144, and two invoices must never carry the same number. This rigor protects the business as much as it reassures the administration.
Continuous and chronological: what it means
Continuous means that no number is skipped. If you have issued invoices 0201 and 0203, the absence of 0202 must be explainable, and in a well-kept system it should never happen. Chronological means that the order of the numbers follows the order of the dates: a more recent invoice always has a higher number.
These two principles have an important practical consequence: a validated invoice is never deleted. If it is wrong, it is cancelled with a credit note, which has its own numbering, and a new invoice is issued. The original invoice stays in the sequence and in the accounts. That is what guarantees a complete and verifiable history.
- One unique number per invoice
- No number skipped or reused
- Number order identical to date order
- No deletion of a validated invoice
Which number format should you choose?
The texts require continuity, not a specific format. You are therefore free to build a readable number. The most widespread format combines a prefix, the year and a counter: FA-2026-0001, FA-2026-0002 and so on. The prefix distinguishes document types, for example FA for invoices, AV for credit notes and DV for quotes.
Many businesses restart the counter on 1 January, which is accepted as long as the year is part of the number and no duplicate is possible. On the other hand, avoid numbers built from the customer's or salesperson's name: they fragment the sequence and make continuity checks almost impossible.
Situations that create gaps
Gaps rarely come from fraud; they mostly come from bad habits. The classic case is an invoice prepared in a spreadsheet, numbered, then abandoned because the customer changed their mind. The number is lost. Another common situation: two people invoicing in parallel in two different files and ending up assigning the same number.
You also see receipt books filled in out of order, invoices cancelled by hand instead of with a credit note, or software changes where numbering restarts from zero without bridging the old and new sequences. Each of these situations is easy to avoid with a tool that assigns the number at validation, not when the draft is created.
- Drafts numbered and then abandoned
- Several invoicing files used in parallel
- Invoices cancelled without a credit note
- Software change without continuity
Example: a smooth switch to new software
Suppose a maintenance company that invoiced in Excel and whose last invoice in July is numbered 2026-0318. When it changes tools in August, it sets the counter so that the first invoice issued is 2026-0319. It also imports the history of its previous invoices to keep a complete view of its customers.
The result: the annual sequence remains continuous despite the change of tool, and the accountant has no break to justify. Had the company restarted at 0001 in the middle of the year, it would have created two invoices with the same number in the same financial year, with explanations to provide in the event of an audit.
Gap-free numbering with m2m.ma
In m2m.ma, the final number is assigned when you validate the invoice, not when you open a draft. The sequence therefore stays continuous, even when several people invoice at the same time. Invoices, credit notes and quotes each have their own numbering, and a validated invoice is corrected with a credit note. You can also import invoices from your old software to bridge the sequences.
To check how this works for your own business, create an account on my.m2m.ma. The 15-day free trial has no commitment: set your counter to follow on from your last invoice, issue a few documents and watch how the sequence behaves, including when a draft is abandoned. That way you will know, before deciding, whether the tool permanently solves the problem of gaps and duplicates.
Frequently asked questions
Can I restart numbering at 1 every year?
This is common practice, accepted as long as the year is part of the number, as in FA-2026-0001, and no duplicate is possible. What matters is that the sequence is continuous and chronological within each year.
Can I have several numbering series?
Yes, provided that each series is itself continuous and clearly identified by a prefix, for example to distinguish two establishments or two activities. Avoid multiplying series without reason: the more there are, the more laborious continuity checks become.
There is a gap in my numbering. What should I do?
Document it immediately: identify the missing number and the reason for its absence, and keep a record of that explanation. Talk to your chartered accountant. Then fix the cause, often a spreadsheet or drafts numbered too early, so that it does not happen again.
Put it into practice with m2m.ma
E-invoicing, accounting and business management services for Moroccan companies. 15-day free trial, no credit card.

