303Document Prefix / Suffix
The letters put before and after document numbers. Running numbers read them through {PREFIX} and {SUFFIX}.
Try it
Where each prefix is used
Running numbers (295) read {PREFIX} / {SUFFIX} from here each time they build a number| Type | Prefix | Suffix | Running number pattern | Next number today |
|---|---|---|---|---|
| CN Credit note | CN | -R | {PREFIX}{YYYY}/{SEQ:4}{SUFFIX} | CN2026/0001-R |
| GR Goods receipt | GR | β | not used yet | β |
| INV Tax invoice | INV | β | {PREFIX}{YYYY}{MM}-{SEQ:5} | INV202611-00001 |
| PO Purchase order | PO | β | {PREFIX}-{FY}-{SEQ:5} | PO-FY2027-00001 |
| PR Purchase request | PR | β | {PREFIX}{SEQ:6} | PR001000 |
| QT Quotation | QT | β | {PREFIX}{YY}-{SEQ:4} | QT26-0001 |
| RC Receipt | RC | /BKK | {PREFIX}{BE}{MM}{SEQ:4}{SUFFIX} | RC2569110001/BKK |
| SO Sales order | SO | β | {PREFIX}{YYYYMMDD}-{SEQ:3} | SO20261109-001 |
Edit the INV prefix (e.g. to IV) and come back: the next number changes at once.
| # | Document type | Name | Prefix | Suffix | Status | |
|---|---|---|---|---|---|---|
| 5 | CN | Credit note | CN | -R | Active | βοΈ |
| 8 | GR | Goods receipt | GR | β | Active | βοΈ |
| 3 | INV | Tax invoice | INV | β | Active | βοΈ |
| 7 | PO | Purchase order | PO | β | Active | βοΈ |
| 6 | PR | Purchase request | PR | β | Active | βοΈ |
| 1 | QT | Quotation | QT | β | Active | βοΈ |
| 4 | RC | Receipt | RC | /BKK | Active | βοΈ |
| 2 | SO | Sales order | SO | β | Active | βοΈ |
Showing 1β8 of 8
π Learn: how this master is built table doc_prefix
Key points
- Change a prefix here and the next running number uses it at once - nothing is copied.
Code
- Entity
domain/DocPrefix.java- Repository
repo/DocPrefixRepository.java- Definition
MasterRegistry: "doc-prefixes"- Page / form
web/MasterController.java- Try-it panel
templates/tools/prefix-preview.html- REST API
GET /api/running-numbers/INV/preview
SQL to try in SSMS (database MasterDataLabDB)
SELECT p.doc_type, p.prefix, p.suffix, r.pattern FROM doc_prefix p LEFT JOIN running_number r ON r.doc_type = p.doc_type;