Guide 7 min 18 November 2026

Invoice numbering in Morocco: sequence, format, migration

How to number invoices in Morocco: a series with no gaps or duplicates, one counter per document type, correction by credit note and migrating from old software.

In Morocco, your invoices must carry numbers that follow one another in chronological order, with no gaps and no duplicates: it is one of the simplest checks an inspector can make. The exact format (prefix, year, number of digits) is up to you; what matters is that the series stays unbroken. This article goes beyond restating the rule: it explains how to maintain the series over time, how to correct a mistake, and how not to break it when you change software. For the rest, see our guide on the mandatory mentions on an invoice.

1. What the rule really requires

Article 145-III of the General Tax Code (CGI) requires you to issue « factures ou mémoires pré-numérotés et tirés d'une série continue » (invoices or statements that are pre-numbered and drawn from an unbroken series), or produced by a computer system in an unbroken series. Each new invoice therefore gets the number that immediately follows the previous one, in the order you issue them. Check with your accountant for your specific case (tax regime, activity).

In practice, three mistakes to avoid:

  • The gap: FA-2026-0041, then FA-2026-0043. An inspector will wonder what happened to 0042.
  • The duplicate: two different invoices carrying the same number.
  • The disorder: a March invoice carrying a higher number than a June invoice.

An assigned number is never reused, even if the invoice is abandoned afterwards.

2. One series per document type

An invoice, a quote, a credit note, a purchase order and a delivery note do not share a series: each has its own counter. In Billora, the default prefixes are:

DocumentDefault prefix
InvoiceFA
QuoteDE
Credit noteAV
Purchase orderBC
Delivery noteBL
Goods receiptBR
Proforma invoiceFP
ExpenseDEP

A default invoice number therefore looks like FA-2026-0042. Your latest quote may very well be DE-2026-0310: the two counters are independent. To understand related document types (proforma, purchase order), see also our article on the proforma invoice.

3. Restart: every year, every month, or never?

Two approaches are common:

  • Annual restart: the series starts again at 0001 every 1 January (FA-2026-0001, then FA-2027-0001). This is the default setting in Billora, and the most readable: the year appears in the number, which avoids any duplicate.
  • Continuous series: the counter never restarts (FA-0001, FA-0002…).

Billora offers three choices for the « Remise à zéro » ("Reset") field, in Paramètres, Numérotation (Settings, Numbering): « Chaque année » ("Every year"), « Chaque mois » ("Every month") and « Jamais (continu) » ("Never (continuous)") (a setting you can change depending on your subscription, see section 7). Once a document has been issued during the year, the choice is locked for the current financial year: changing the periodicity in the middle of the year would restart the counter at 1 mid-year, which would break the series. If you want to change it, do so on 1 January, before your first issue of the year.

4. Draft: when is the number assigned?

A draft invoice has no number yet. It receives one on first issue (sending, or switching to the "sent" status) or when the first payment is recorded. This has a useful consequence: a draft you abandon can be deleted without leaving a gap in the series.

Conversely, an invoice that has already received its number can no longer be deleted: Billora offers « Annuler » ("Cancel") instead of « Supprimer » ("Delete"), and the cancelled invoice keeps its number. The series therefore stays complete. The number is assigned in the same operation as the save: if the operation fails, the number is not consumed.

5. A wrong invoice: correct or cancel, never delete

Did you bill the wrong amount, the wrong client or the wrong VAT? Never change the number and do not delete the invoice. In Billora, two cases arise:

  • Invoice sent but not yet paid: the invoice page reminds you, « pour la corriger, modifiez-la puis renvoyez-la au client » ("to correct it, edit it then send it again to the client"). If the client no longer wants it, simply Annuler (Cancel) the invoice: it keeps its number and a credit note is not needed.
  • Invoice already paid, even partly: issue a credit note (« avoir ») that cancels or corrects the original invoice, then, if needed, a new invoice with the next number. A credit note always references the original invoice and has its own series (prefix AV by default).

Everything is explained in our article on the invoice credit note in Morocco.

6. Changing software without breaking the series

This is the riskiest moment. If your last invoice in Excel or in an old piece of software is no. 87, your first invoice in Billora must be no. 88, not no. 1.

How to proceed in Billora:

  1. Before issuing your first document, open Paramètres, Numérotation.
  2. In the Reprendre une numérotation existante ("Resume an existing numbering") card, each document type shows « Dernier émis : … » ("Last issued: …") and a Prochain n° ("Next no.") field. Enter the number that follows the one from your old tool (for example 88).
  3. If you wish, fill in Justification: it is kept in the activity log, which can be useful in case of an inspection.
  4. Click Enregistrer (Save).

The Assistant de migration (Migration assistant) link offers a guided version (« Reprendre ma numérotation », "Resume my numbering"): you can import your old invoices, which keep their original numbers, or set only the next number. For the full procedure, see the migration to Billora page and the help article Régler la numérotation de vos documents (Setting up your document numbering).

Three limits to know. Resuming a numbering depends on your subscription. The starting point can only be set before the first issue of the document type concerned: afterwards it is locked, so that no jump is created in the series. And resuming is not offered while the account is in test mode: it is set once the account is activated in live mode.

7. Customising the format

You can change the prefixes (10 characters maximum), the number length (3 to 6 digits) and the separator (hyphen, underscore or dot). A prefix change only affects new documents; the counter carries on: if your last invoice is FA-2026-0042 and you switch to the prefix FAC, the next one will be FAC-2026-0043.

Format customisation depends on your subscription. One important point: if your subscription changes and no longer includes this option, the format you had saved keeps applying to your new documents. Going back to the default format in the middle of the year would break the series. Only changing the format is then locked.

Only the owner and administrators can change the numbering; other roles see the page as read-only.

8. Checking that your series is unbroken

Billora provides a Continuité de séquence ("Sequence continuity") report (« Contrôle fiscal : trous dans la numérotation », "Tax audit: gaps in numbering") that flags missing numbers. Check it before a year-end close or an inspection, or ask your accountant to do so: see Continuité de séquence.

Frequently asked questions

Can I renumber an invoice that has already been issued?

No. An assigned number is final. To correct an issued invoice, edit it if it has not yet been paid; otherwise, issue a credit note.

Do I have to restart from 0001 every year?

It is not required as such: what matters is that the series stays unbroken and chronological. Annual restart is simply the most widespread practice, and it is the default setting in Billora.

Do my drafts have a number?

No: the number is assigned on first issue. A draft without a number can be deleted without leaving a gap.

What should I do if I notice a gap in my series?

Do not "fill" it by backdating an invoice. Identify the cause (cancelled invoice, jump linked to a migration) and keep a written record; have your accountant validate the way forward.

I can no longer edit the « Prochain n° ».

That is normal if a document of this type has already been issued or imported: the starting point is then locked to preserve the continuity of the series.

In summary

  • Your invoices follow an unbroken series, with no gaps or duplicates (Article 145-III of the General Tax Code (CGI), check with your accountant).
  • Each document type has its own counter and its own prefix.
  • A wrong invoice can be edited as long as it is not paid; otherwise it is corrected by a credit note; it is neither deleted nor renumbered.
  • A draft has no number: it receives one on first issue.
  • When changing software, set the next number before your first issue in Billora.
  • The saved format keeps applying even if your subscription changes; only changing it is locked.
invoice numbering MoroccoinvoicingArticle 145 CGIcredit notemigrationMorocco