Skip to content
MyHissab MyHissab

Guides

Customising document numbering in MyHissab: prefix, format and carry-over

Prefix, next number, token format, carrying over an existing numbering sequence, new-year behaviour: set up each document series without gaps or duplicates.

By the MyHissab team 9 min read

This guide explains how to set the numbering of your invoices, quotes, credit notes, purchase orders and delivery notes from Settings → Document numbering. By the end, you will know how to choose a prefix, write a token format, carry over a numbering sequence started elsewhere (for example at 2600021) and anticipate what happens on 1 January.

Why numbering is not left to chance

The invoice number is one of the statements expected on an auto-entrepreneur invoice: it must be unique, chronological, with no gaps and no duplicates. The most common convention is FAC-YYYY-NNNN, but the law does not impose that exact shape; what matters is continuity. The full list of statements is covered in the guide on required statements on an auto-entrepreneur invoice and illustrated in the annotated invoice template.

Three practical consequences:

  • an issued invoice is never edited: a mistake is corrected with a credit note or a cancellation, never by reusing the number;
  • a cancelled invoice keeps its number in the series: the next one takes the following number, and the cancellation explains the "gap";
  • a new series cannot restart from zero mid-year once numbers have been issued under the old one.

Numbering is therefore something to set before the first invoice, or right after importing your history, and then to leave alone unless there is a serious reason.

Where numbering is configured

Open Settings, then "Document numbering". The page shows one series per document type, each with its own counter: Invoices, Quotes, Delivery notes, Purchase orders, Credit notes. The default prefixes are FAC-, DEV-, BL-, BC- and AV-, followed by the current year, then a four-digit counter: the first invoice of 2026 is FAC-2026-0001, the first quote DEV-2026-0001.

Each series has four settings:

Setting Role Default
Prefix Text placed before the counter when no format is defined; it may be empty FAC-2026- (depending on type)
Next number Value the counter will take on the next document 1
Digit count Length of the counter, padded with zeros (1 to 10) 4
Format (optional) Token template that replaces "prefix + counter" empty

A "Next number preview" is recalculated under the fields: that is your check before saving. The settings apply to the current year's series; documents already issued are not renumbered.

Format tokens

Without a format, the number is simply the prefix followed by the counter. As soon as you enter a format, it takes over. Accepted tokens, in English or French, regardless of case:

  • {year} or {année}: the year on four digits;
  • {yy} or {aa}: the year on two digits;
  • {month} or {mois}: the month on two digits;
  • {sequence:N} or {séquence:N}: the counter on N digits; {sequence} without a length uses the "Digit count" setting.

The format must contain the sequence token at least once, otherwise it is rejected. Examples on 25 September 2026, with the next number at 21 and "Digit count" left at 4:

Format entered Resulting number
(empty, prefix FAC-2026-) FAC-2026-0021
FAC-{year}-{sequence:4} FAC-2026-0021
FAC{yy}-{sequence:3} FAC26-021
{year}{month}-{sequence:3} 202609-021
26{sequence:5} 2600021
{yy}{sequence:5} 2600021
F/{year}/{sequence} F/2026/0021
AK-{sequence:4} AK-0021

The two formats 26{sequence:5} and {yy}{sequence:5} give the same number today, but not next year: see the section on the new year.

Carrying over an existing numbering sequence, step by step

Amine Kaci, a developer in Algiers, has been invoicing since January from a spreadsheet with seven-digit numbers: 2600001, 2600002… up to 2600020, his latest invoice of 120,000.00 DZD. He opens an account and wants his next invoice to carry number 2600021, with no break.

  1. Open Settings → Document numbering, then the "Invoices" series.
  2. In "Format (optional)", enter {yy}{sequence:5}: "26" for 2026, then a five-digit counter.
  3. In "Next number", enter 21, that is the last number issued plus one.
  4. Leave "Digit count" as it is: the length is already fixed by {sequence:5}.
  5. Check the preview: it must show 2600021. If you read 2621 or 26000021, the token length is wrong.
  6. Save. The next invoice will take that number; the one after, 2600022.
  7. Repeat for quotes, credit notes and notes if you also had series in progress.

If you also want your old invoices in the app, import them before or after this setting: the CSV history import keeps the original number of each invoice dated before the account was opened, provided it is unique, and does not touch the counter. It is up to you to set "Next number" above the highest imported number.

For a mid-year carry-over in the classic form, the logic is the same: last number FAC-2026-0057 in the old tool, so prefix FAC-2026- (or format FAC-{year}-{sequence:4}) and next number 58.

What happens when the year changes

Series are annual. On the first document of 2027 (or the first time the Numbering page is opened), the 2027 series is created, inheriting the format, prefix and digit count from 2026: there is nothing to re-enter. A single question determines the counter: does the year appear in the prefix or in the format?

Setting in 2026 Last number of 2026 First number of 2027
Prefix FAC-2026-, no format FAC-2026-0149 FAC-2027-0001
FAC-{year}-{sequence:4} FAC-2026-0149 FAC-2027-0001
{yy}{sequence:5} 2600149 2700001
26{sequence:5}, prefix FAC-2026- kept 2600149 2600001 (duplicate)
26{sequence:5}, prefix cleared 2600149 2600150
AK-{sequence:4}, prefix cleared AK-0149 AK-0150

Two rules can be read from this table:

  • the counter restarts at 1 if the prefix contains the year in plain text (FAC-2026-, the default prefix) or if the format contains {year}, {année}, {yy} or {aa}; in the prefix, the year is replaced by the new one;
  • if the year only appears as digits typed by hand (26{sequence:5}), the app cannot know that "26" means 2026: the "26" stays, and the counter only continues if the prefix has been cleared. Always prefer {yy} to a hard-coded year.

The prefix no longer appears in the number once a format is defined, but it is still used to decide the year change: if it contains the year (FAC-2026-, the default prefix), the counter restarts at 1 on 1 January. If your format has no year token and you want a continuous counter, clear the prefix.

A format with no year at all (AK-0149, AK-0150), with the prefix cleared, is allowed: the counter continues from one year to the next, for the whole life of the activity. Both approaches respect chronology.

The counter never goes backwards

You can increase "Next number" at any time, but never bring it below its current value: the field is rejected with the message "The counter cannot go backwards: it already stands at …". The reason is simple: two documents must never share a number, and the counter makes no difference between a draft, an issued invoice or a cancelled invoice, since each has consumed its number.

In practice:

  • a draft has already consumed its number as soon as it is created; do not create documents "just to see", use the preview;
  • a quote converted into an invoice receives a number in the invoice series (DEV-2026-0012 for 120,000.00 DZD becomes, for example, FAC-2026-0021); the quote itself is locked;
  • a credit note takes its number from the credit note series (AV-2026-0002 for 15,000.00 DZD) without touching the invoice counter;
  • deliberately increasing the counter (from 21 to 100) is possible, but creates a gap of 79 numbers you would have to justify; avoid it.

If you picked the wrong format after a few invoices were issued, do not restart the series: keep the counter and only correct the "text" part of the format. The guide on creating your first invoice shows when the number is assigned.

Common mistakes

  • Assuming the prefix no longer matters once a format is set. With prefix FAC-2026- and format AK-{sequence:4}, the number is indeed AK-0021, but the counter will restart at 1 in 2027 because the prefix contains the year. Clear the prefix if you want a continuous counter; keep it (or use a year token) if you want a yearly restart.
  • Forgetting the token length. {sequence} without ":N" follows "Digit count". If that setting is 4 and you wanted seven digits, the number will be too short.
  • Hard-coding the year. 26{sequence:5} works in 2026, but in 2027 it restarts at 2600001 if the FAC-2026- prefix is kept (a duplicate of the first 2026 invoice), or carries on with a misleading "26" if the prefix has been cleared. Write {yy}{sequence:5}.
  • Expecting a monthly counter. {month} shows the month in the number, but the counter does not restart at 1 every month: only years open a new series. A format {year}{month}-{sequence:3} will give 202609-021 then 202610-022.
  • Changing format for each type with no consistency. A client who receives DEV-2026-0012 and then 2600021 gets lost. One logic (for example {yy}{sequence:5} everywhere, with a different letter per type in front of the year token if needed) is easier to read.
  • Creating a test invoice. It consumes a number. Use the preview, or a quote if you want to see a PDF.

Frequently asked questions

Can I remove the prefix and have digits only? Yes. Leave the prefix empty and the format empty: the number will be the counter alone, zero-padded according to "Digit count". Or use a format with no text, such as {yy}{sequence:5}, to get 2600021 and see the counter restart at 1 the following year.

My imported old invoices do not have the same format as my new series: is that a problem? No, provided each number remains unique and chronology is respected. Imported invoices keep their original number; new ones follow the series you set. Note the date of the switch from one format to the other so you can explain it, and choose a next number that extends the old sequence if the two formats are compatible.

What happens if I set nothing? Each document type gets its default series: FAC-2026-0001, DEV-2026-0001, AV-2026-0001, BC-2026-0001, BL-2026-0001, four digits, and the counter restarts at 1 every 1 January with the new year in the number. That is numbering in line with the FAC-YYYY-NNNN convention; customise it only if you are carrying over history or prefer another shape.

This information is provided for practical purposes and reflects the texts in force on the update date. It does not replace advice from the ANAE, the tax administration or a professional. Always check the latest version of the official texts.

From theory to your first invoice.

MyHissab applies these rules automatically: legal mention, amount in words, revenue caps. Free, no credit card.

Read next