Skip to main content

Document numbering

Settings → Company setup → Document numbering lists every kind of numbered document — invoices, credit memos, orders, quotes, receipts, purchase orders, supplier bills, customers, suppliers and the rest — with the pattern its numbers follow, when it starts again from one, the next number exactly as it will print, and the last one issued.

Reading the list needs number_sequence.read (Admin, Manager and Accounting by default). Changing a pattern or when it starts again needs setting.manage. Moving the counter needs number_sequence.adjust, which only Admin holds by default. Each person sees only the controls they may use.

A pattern​

A pattern is a prefix, the running number padded to a number of digits, and a suffix. INV-{fy}-{sequence:05d} prints INV-FY2027-00042.

TokenPrints
{sequence}The running number. {sequence:05d} pads it to five digits. Every pattern needs it.
{year}Four-digit calendar year of the document date.
{yy}Two-digit year.
{month}Two-digit month.
{day}Two-digit day.
{fy}The fiscal year code the document date falls in, such as FY2027.

Edit on a row opens the pattern as prefix, digits and suffix, with the raw pattern underneath and buttons that add a token to the prefix. A sample of the next three numbers updates as you type.

When it starts again​

ChoiceThe running number goes back to one
NeverOne unbroken run, for numbers like customer and supplier codes.
Every calendar yearOn 1 January.
Every fiscal yearWhen your fiscal year starts. The default for most documents.
Every monthOn the first of the month.
Every dayEach day.

A pattern that starts again must say which period it is in, or January's INV-00001 and February's would be the same number. A monthly reset needs {month}, {year} or {yy} in the pattern; a fiscal-year reset needs {fy}, {year} or {yy}. The screen refuses the pair before you save, and so does the server.

Moving the counter​

Next running number is normally raised once: you are moving from another system mid-year and your invoices must carry on from 4,418 rather than start again at 1.

Lowering it is dangerous. Numbers between the new value and the current one may already be on documents in this run. The screen says which numbers would be reused; if any of them was issued, the next document is refused as a duplicate. Only lower the counter to undo a mistaken jump when nothing has been issued since.

Every change needs a reason, which is kept in the audit log with the before and after values. Somebody will ask why the numbers changed.

What happens to documents already numbered​

Nothing. A new pattern applies from the next document. Changing when a sequence starts again begins a new run at one, in the new pattern.

Common mistakes​

"Cannot issue" on a row. The saved pattern and reset do not work together — usually a reset that needs a period token the pattern does not have. Edit the row; the screen says what is missing.

"The next number did not change after I edited the pattern." The sample shows the next number in the current run. If you changed when it starts again, the new run begins at one.

Configuration​

Each sequence is two settings, numbering.<sequence>.format and numbering.<sequence>.reset, plus a counter per run. This screen is the place to change them; the counter is not a setting and can only be moved here (or through the API) with a reason.