Settings
Configure Purchase and Receiving Number Prefix
New purchase IDs combine the configured prefix with a six-digit sequence. Although settings accepts 1-6 alphanumeric characters, the current receiving creation path reliably applies only a three-character prefix; other lengths can fall back to RID.
- Menu path
- Manage -> Core Settings -> Receivings -> Receiving Prefix
- Verified from
- Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
frontend/modules/settings_write.html Receiving Prefix field maxlength and alphanumeric pattern, frontend/static/script/js/modules/js/settings.js receiving_prefix load save and form validation, api/src/controllers/settings.controller.js 1-6 character settings validation, api/src/models/receiving.model.js three-character active prefix rule six-digit sequence edit retention and duplicate retry, api/src/models/receiving.model.js stocklog reference prefixId
Use a Stable Three-Character Code
| Choice | Example | Current result |
|---|---|---|
| Three alphanumeric characters | PUR | New numbers use PUR plus six digits, such as PUR000001. |
| Default fallback | RID | Used when no usable three-character receiving prefix reaches the create path. |
| One, two or four-to-six characters | P or STORE1 | Settings may accept it, but current receiving creation can fall back to RID; avoid for live numbering. |
| Spaces or punctuation | PO- | The form's alphanumeric pattern does not approve these; use letters and digits only. |
| Frequently changed code | PUR then REC | Creates separate visible numbering series and complicates chronological reconciliation. |
Configure and Test the Prefix
- Choose a short three-character alphanumeric code approved by the owner or accountant.
- Open Manage -> Core Settings -> Receivings.
- Enter the code in Receiving Prefix without spaces or punctuation.
- Save Core Settings and reopen the Receivings tab to confirm the value remains.
- Create one controlled Ordered purchase so stock is not changed merely for a numbering test.
- Return to Purchases and confirm the new purchase number begins with the chosen code and ends in six digits.
- Search and open the number, then verify preview/print surfaces use the same identifier.
- Only after that test should staff use the prefix for live documents.
How New Numbers Are Generated
| Rule | Behavior | Operator implication |
|---|---|---|
| New document only | A human-readable ID is assigned during creation. | Do not type or manually invent the purchase number. |
| Prefix | Active create path uses the branch setting when trimmed length is exactly three; otherwise RID. | Test the actual created document, not only the saved setting. |
| Sequence | Highest matching prefix number is incremented and padded to six digits. | PUR000009 is followed by PUR000010. |
| Concurrent saves | Duplicate-key conflicts reread the maximum and retry, up to five attempts. | Do not repeatedly click Save while another operator is creating purchases. |
| Edit | Existing receiving_id/receiving_number is retained. | Changing settings does not rename historical purchases. |
Where the Number Matters
- Purchases list search, status review and document opening.
- Printed and downloaded purchase documents sent to suppliers.
- Inventory Log references created when received stock moves.
- Return, void, edit and receiving investigations.
- Supplier history, purchase reports, exports and accounting evidence.
- Support requests where staff must identify one exact purchase.
Change Prefix Without Rewriting History
- Document the reason, approval date, old prefix and last issued number.
- Finish or clearly identify open drafts, orders and partial receipts under the old series.
- Change to the approved three-character code in Core Settings and save.
- Create one controlled Ordered test purchase.
- Verify the new series begins or continues as expected and does not alter older IDs.
- Tell receiving, accounting and supplier-facing staff the effective date.
- Keep both prefixes searchable and preserve printed/exported historical evidence.
Do Not Use Prefix as Business Logic
| Assumption | Why it is unsafe | Use instead |
|---|---|---|
| Prefix proves branch | Number uniqueness and historical settings can span changing branch conventions. | Open the document and verify its stored branch. |
| Prefix proves status | Ordered, partial, received and cancelled documents share the series. | Read the current purchase status. |
| Prefix proves supplier | Any supplier can be recorded under the same receiving series. | Verify supplier identity on the document. |
| Prefix proves payment | Payment details are separate fields and external evidence. | Reconcile payment mode, note and financial records. |
| Changing prefix renumbers old records | Edits retain original purchase identity. | Use search and cross-reference both historical series. |
Troubleshooting and Recovery
| Problem | Likely reason | Controlled response |
|---|---|---|
| New number starts RID | Configured value was blank or not exactly three characters in the active create path. | Use a tested three-character alphanumeric prefix and create a new Ordered test document. |
| Setting rejects prefix | Value is empty, longer than six, or fails the alphanumeric field pattern. | Enter an approved three-character letters/digits code. |
| Sequence appears to skip | Concurrent creation, deleted/void records or another document already used a number. | Search the full series; never renumber documents merely to remove a gap. |
| Duplicate-number save fails | Repeated concurrency exceeded retry handling or stale data remains. | Stop repeated submissions, refresh the list and verify whether a document was created before retrying. |
| Old purchase keeps old prefix | Edits intentionally retain identity. | This is expected; do not recreate it solely for the new prefix. |
| Stock log reference is unfamiliar | It uses the purchase number active when receiving occurred. | Open the referenced purchase and compare item movement and status. |
| Two branches use confusing codes | Prefix policy was not coordinated. | Adopt distinct tested three-character codes prospectively and preserve old records. |
Numbering Control Checklist
- Prefix is approved, alphanumeric and exactly three characters.
- A controlled new purchase proves the actual generated format.
- Purchase list, preview, print and search show the same number.
- Received stock logs reference the expected purchase number.
- Prefix changes have an effective date and do not rewrite history.
- Sequence gaps are investigated, not cosmetically repaired.
- Staff use the full purchase number in supplier and support communication.