Skip to content
Where every document number comes from — transcript

Where every document number comes from — transcript

Presentation 1 of 2 in Number your documents across companies and branches · about 9 minutes · for the whole-system operator — you run the books.

Play this as a presentation — one slide per step, with the same narration. Every word of every step is on this page.

This presentation is for you if you keep the books for GadgetSphere’s three companies and somebody, an auditor, a branch manager or your own curiosity, has asked where the numbers on the documents come from. In about nine minutes you will learn the one counter behind every number, read the three numbers a document carries, and know which surprises are the design working rather than a fault.

Step 1 — Know the one counter behind every number

After this step you will know where the running numbers in your tenant, GadgetSphere’s whole BigLedger account, come from. BigLedger keeps one table of counters for the whole tenant, and the numbers it stamps on documents are drawn from it: cash bills, invoices, vouchers, stock documents, and the customer and supplier codes it generates as well. A counter is identified by what it counts and for whom. The cash-bill count for the whole tenant is one counter, and the cash-bill count for branch GS-KV-01 is another. Nobody sets counters up. The first time a document type needs a number at a level, its counter is created on the spot, and every later document of that type at that level draws from the same one. That is why there is no numbering screen to fill in before GadgetSphere’s tills open.

Reference: Document Numbering — One table numbers everything

Step 2 — Read the three numbers on each document

After this step you can tell which number you are looking at. A document receives its tenant number, shown as Doc No (Tenant), as soon as it is created, even as a draft. It is one sequence per document type across all three GadgetSphere companies and all twenty-two branches, so a cash bill at GS-KV-01 and the next one at GS-PEN-01 can carry consecutive numbers. The company number and the branch number, Doc No (Company) and Doc No (Branch), are stamped only when the document is finalised, each from its own sequence, and a branch number only if the document has a branch. So a draft normally carries one number and a finalised document three. A branch number repeats across branches and a company number across companies, so neither means anything alone. The e-invoice number is none of these: Malaysia’s tax authority, LHDN, assigns it.

Reference: Document Numbering — The three numbers on every document

Step 3 — See why two tills never wait for a number

After this step you will know why numbers are handed out quickly and why the counter runs ahead of your documents. Every document counter keeps a pool of numbers issued in advance. A document takes the lowest number left in its counter’s pool, so two tills saving in the same second each get their own number without queuing. When the pool runs low, the counter is moved on by five hundred and those five hundred go into the pool. Two things follow. The counter’s own figure is the top of the pool, not the last number used, so it normally runs ahead of your documents. And unless support recorded a starting value before the first document, a new counter starts at the platform default, which is why GadgetSphere’s first cash bill is number one million, not one.

Reference: Document Numbering — Why two tills never wait for each other — the pool

Step 4 — Explain numbers that are not in date order

After this step you can answer the auditor who says the numbers are out of order. The tenant number is handed out when a document is created, not when it is finalised. A draft started at nine in the morning and finalised at five keeps its nine o’clock number, lower than bills finalised in between. Once a number is written on a document it stays there: voiding or discarding the document does not give it back, so a voided bill still accounts for its number. That does not make the run unbroken, though. A number can be taken and never reach a document, so a missing number is a question to ask, not proof that somebody deleted a bill. And the numbers are plain integers, with no prefix, year or branch code stored in them. So the number tells you which document is which, not when it happened: for the order of events, read the dates on the documents.

Reference: Document Numbering — Common mistakes

Step 5 — Recognise a document with no number yet

After this step a document with no number will not alarm you. Some screens need a document to exist before you have finished making it, such as an import from a file or a scanned bill being converted, so the applet registers an empty row marked TEMP to hang the lines and the file on. A TEMP document is deliberately not numbered. It receives its tenant number the moment it is genuinely saved, so if it is yours, open it and save it, and its Doc No (Tenant) appears. If it was abandoned, leave it: a background job permanently deletes TEMP documents older than three hours, and the standard tenant configuration runs it every fifteen minutes. That schedule belongs to your own tenant, so if old TEMP rows keep piling up in GadgetSphere’s listings, ask support whether the sweeper is scheduled on yours. Meanwhile they post nothing and move no stock.

Reference: Document Numbering — The document with no number at all — TEMP

Check yourself

Three to five questions on what you just heard. Every correct answer links to the page that makes it correct, so you can check the source, not just the mark.

1. A cash bill at GS-KV-01 is numbered 1000583 and the next cash bill, at GS-PEN-01, is 1000584. Why?


2. A draft invoice for branch GS-KV-01 shows a Doc No (Tenant) but a blank Doc No (Branch). What does that tell you?


3. Nobody asked support for a starting value. Why does a new tenant's first cash bill carry the number 1,000,000?


4. An import screen left a document marked TEMP with no number an hour ago, and nobody wants it. What should you do?


Answer key
  1. Doc No (Tenant) is one sequence per document type across every company and branch — Document Numbering — The three numbers on every document
  2. Nothing is wrong: the branch number is stamped only when the document is finalised — Document Numbering — The three numbers on every document
  3. A counter that has never existed starts at the platform default of 999,999, and the first number drawn is one more — Document Numbering — Why two tills never wait for each other — the pool
  4. Leave it: an abandoned TEMP document carries no number, posts nothing, and is swept away once it is older than three hours where the sweeper is scheduled — Document Numbering — The document with no number at all — TEMP
This is a self-check. Your answers are marked in your browser and stay there — nothing is sent anywhere, nothing is recorded, and the marking is readable in the page source, so it is not a credential. Open the answer key at any time.

Next: Choose the numbers people see, before the first document · Back to the series · Play this as a presentation

Last updated on