Neriyam
Open App

Document Numbering

How codes like PO/2026-27/00042 are built, and what a draft ref is.

Document Numbering#

Every transactional document in Neriyam has a codePO/2026-27/00042, SO/2026-27/00100, GRN/2026-27/00231. The code is generated from a single format template per series. You decide what placeholders the format uses, what literal characters sit between them, and when the code gets assigned to a record.

The format template#

Each series has a single Format field — a template string that mixes placeholders with literal characters. Anything inside {...} is a placeholder; everything else (slashes, dashes, letters) is taken literally and appears as-is in the generated code.

The standard format is {DOC_ID}/{FY_START,4}-{FY_END,2}/{SEQ,5}, which produces SO/2026-27/00042 for sales order #42 in fiscal year 2026-27.

PlaceholderResolves toExample
{DOC_ID}The series' document type codeSO, PO, PR, GRN
{SEQ,N}The running serial, padded to a minimum of N digits{SEQ,5}00042
{FY_START,N}Fiscal year start year, optionally truncated to N digits{FY_START,4}2026
{FY_END,N}Fiscal year end year, optionally truncated to N digits{FY_END,2}27
{YEAR,N}Calendar year, optionally truncated to N digits{YEAR,4}2026
{MONTH}Month, zero-padded to 2 digits04
{DAY}Day, zero-padded to 2 digits08
{QUARTER}Calendar quarter2
{WEEK}Week of the year15

The number after the comma is the minimum width / padding length. Drop the comma to use the default width — for example, {SEQ} yields 42 instead of 00042.

Your admin configures the format in Settings › Document Numbering. A live preview shows the next generated code as you type.

Draft ref vs. real code#

When you first create a transactional document (sales order, purchase order, etc.), it is in Draft status. At that point Neriyam does not burn a real code on it yet — it assigns a temporary draft ref instead, like SO-DRAFT-1, PO-DRAFT-42, or SE-DRAFT-27. The format is the document type, the literal DRAFT, and a sequence — so abandoned drafts never use up real serial numbers.

The real code is assigned later — either on Create, Submit for Approval, or Approve, depending on how the series is configured.

When the code is assigned#

Each series has an Assign On setting with three options:

  • On Create — code assigned immediately. No draft ref appears; the draft gets a real code right away.
  • On Submit — code assigned when you click "Submit for Approval". Draft ref is replaced at that moment.
  • On Approve — code assigned when the approver clicks "Approve". Draft ref stays until approval.
flowchart LR
  Create([Create record]) --> A{Assign On?}
  A -->|On Create| RC[Real code now]
  A -->|On Submit| DR1[Draft ref]
  A -->|On Approve| DR2[Draft ref]
  DR1 --> Sub([Submit]) --> RC2[Real code now]
  DR2 --> Sub2([Submit]) --> Pen[Pending Approval still draft ref]
  Pen --> App([Approve]) --> RC3[Real code now]

On Submit is a good default for most documents — you commit a number as soon as the document is finalised, but still avoid wasting numbers on abandoned drafts.

Series management#

A series is a numbering sequence with its own counter and rules. Most organizations need only one series per document type — a single PO series, a single SO series, etc. — but Neriyam supports multiple series per document type if you need them (for example, separate branches or separate companies inside one organization).

Each series has these settings:

  • Identifier — a short code for the series, used as the {DOC_ID} placeholder (e.g., PO, PO-EXPORT)
  • Name — human-friendly label (e.g., "Purchase Orders — Domestic 2026")
  • Format — the template string described above
  • Auto Numbering — generate automatically, or let users enter the code manually
  • Allow Override — let users override the generated code (for importing historical data, for example)
  • Assign On — On Creation / On Submit / On Approval (see above)
  • Reset Frequency — when the serial counter resets: Never, Fiscal Year, Calendar Year, Quarterly, Monthly, Weekly, or Daily

Reset frequency#

The serial counter can reset on a schedule. The most common choice is Fiscal Yearly — on April 1 (or whatever your FY start is), the counter goes back to 1 and the fiscal-year portion of the code rolls to the new year.

ResetSample effect
NeverPO/00042, PO/00043, ... continues forever
Fiscal YearlyPO/2026-27/00042, then on April 1: PO/2027-28/00001
Yearlyresets Jan 1
Quarterlyresets Apr 1, Jul 1, Oct 1, Jan 1
Monthlyresets on the 1st of each month
Weekly, Dailyas the names suggest — rare in real ERP use

What gets numbered#

The following document types use configurable numbering series:

  • Masters — Items, Item Categories, Customers, Suppliers, Warehouses
  • Sales — Sales Orders, Sales Delivery Notes, Sales Returns
  • Purchase — Purchase Requisitions, Purchase Orders, Goods Receipt Notes, Purchase Returns
  • Inventory — Opening Stock, Stock Transfer, Stock Adjustment
  • Manufacturing — Production Entries, Scrap Entries
  • Job Work (planned) — Job Work Receipts, Job Work Deliveries, Job Work Returns
  • Subcontracting (planned) — Subcontract Deliveries, Subcontract Receipts, Subcontract Returns

Your admin can see the full list in Settings › Document Numbering › Document Types.

Job Work and Subcontracting transactions are planned for an upcoming release. The numbering series are pre-configured so they're ready when the modules ship.

Stock-entry transaction types#

Inventory, Manufacturing, Purchase-stock, Sales-stock, and the planned Job Work / Subcontracting transactions are all stock entries under the hood, and each has a short code that appears in the API and in the system audit fields. The codes show up in error messages and ledger filters; the friendly labels show up in the UI.

CodeFriendly nameGroupStatus
OPNOpening StockInventoryActive
ADJStock AdjustmentInventoryActive
TRFStock TransferInventoryActive
PPRGoods ReceiptPurchaseActive
PPTPurchase ReturnPurchaseActive
SPDSales Delivery NoteSalesActive
SPTSales ReturnSalesActive
MFGProduction EntryManufacturingActive
SCRScrap EntryManufacturingActive
PSDJob Work DeliveryJob WorkPlanned
PSRJob Work ReceiptJob WorkPlanned
PSTJob Work ReturnJob WorkPlanned
SSDSubcontract DeliverySubcontractingPlanned
SSRSubcontract ReceiptSubcontractingPlanned
SSTSubcontract ReturnSubcontractingPlanned

All planned series use the standard format {DOC_ID}/{FY_START,4}-{FY_END,2}/{SEQ,5} and reset on fiscal-year change. Active series can use any format your admin configures.

Planned Job Work and Subcontract series — default code prefixes#

SeriesDefault code prefixExample
Job Work ReceiptJW-GRNJW-GRN/2026-27/00001
Job Work DeliveryJW-DNJW-DN/2026-27/00001
Job Work ReturnJW-RETJW-RET/2026-27/00001
Subcontract DeliverySUB-DNSUB-DN/2026-27/00001
Subcontract ReceiptSUB-GRNSUB-GRN/2026-27/00001
Subcontract ReturnSUB-RETSUB-RET/2026-27/00001

Manual override#

If Allow Override is on for a series, you can type your own code when creating a record (instead of letting Neriyam generate one). This is useful when:

  • Importing historical data that already has codes you want to keep
  • Matching an external document number (an email from a customer requesting "Please use your code ABC-2026-001")

Manual override can break the continuous serial sequence. Use it sparingly — usually only for one-off data migrations.

Last updated