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

Set the numbering prefixUse an approved three-character alphanumeric code and test it before live purchasing.
Verify generated purchase numbersNew documents should show the intended prefix and six-digit sequence in the Purchases list.
Trace received stock by referenceReceived purchase stock movements use the generated purchase number as their Inventory Log reference.

Use a Stable Three-Character Code

ChoiceExampleCurrent result
Three alphanumeric charactersPURNew numbers use PUR plus six digits, such as PUR000001.
Default fallbackRIDUsed when no usable three-character receiving prefix reaches the create path.
One, two or four-to-six charactersP or STORE1Settings may accept it, but current receiving creation can fall back to RID; avoid for live numbering.
Spaces or punctuationPO-The form's alphanumeric pattern does not approve these; use letters and digits only.
Frequently changed codePUR then RECCreates separate visible numbering series and complicates chronological reconciliation.

Configure and Test the Prefix

  1. Choose a short three-character alphanumeric code approved by the owner or accountant.
  2. Open Manage -> Core Settings -> Receivings.
  3. Enter the code in Receiving Prefix without spaces or punctuation.
  4. Save Core Settings and reopen the Receivings tab to confirm the value remains.
  5. Create one controlled Ordered purchase so stock is not changed merely for a numbering test.
  6. Return to Purchases and confirm the new purchase number begins with the chosen code and ends in six digits.
  7. Search and open the number, then verify preview/print surfaces use the same identifier.
  8. Only after that test should staff use the prefix for live documents.

How New Numbers Are Generated

RuleBehaviorOperator implication
New document onlyA human-readable ID is assigned during creation.Do not type or manually invent the purchase number.
PrefixActive create path uses the branch setting when trimmed length is exactly three; otherwise RID.Test the actual created document, not only the saved setting.
SequenceHighest matching prefix number is incremented and padded to six digits.PUR000009 is followed by PUR000010.
Concurrent savesDuplicate-key conflicts reread the maximum and retry, up to five attempts.Do not repeatedly click Save while another operator is creating purchases.
EditExisting 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

  1. Document the reason, approval date, old prefix and last issued number.
  2. Finish or clearly identify open drafts, orders and partial receipts under the old series.
  3. Change to the approved three-character code in Core Settings and save.
  4. Create one controlled Ordered test purchase.
  5. Verify the new series begins or continues as expected and does not alter older IDs.
  6. Tell receiving, accounting and supplier-facing staff the effective date.
  7. Keep both prefixes searchable and preserve printed/exported historical evidence.

Do Not Use Prefix as Business Logic

AssumptionWhy it is unsafeUse instead
Prefix proves branchNumber uniqueness and historical settings can span changing branch conventions.Open the document and verify its stored branch.
Prefix proves statusOrdered, partial, received and cancelled documents share the series.Read the current purchase status.
Prefix proves supplierAny supplier can be recorded under the same receiving series.Verify supplier identity on the document.
Prefix proves paymentPayment details are separate fields and external evidence.Reconcile payment mode, note and financial records.
Changing prefix renumbers old recordsEdits retain original purchase identity.Use search and cross-reference both historical series.

Troubleshooting and Recovery

ProblemLikely reasonControlled response
New number starts RIDConfigured 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 prefixValue is empty, longer than six, or fails the alphanumeric field pattern.Enter an approved three-character letters/digits code.
Sequence appears to skipConcurrent 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 failsRepeated 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 prefixEdits intentionally retain identity.This is expected; do not recreate it solely for the new prefix.
Stock log reference is unfamiliarIt uses the purchase number active when receiving occurred.Open the referenced purchase and compare item movement and status.
Two branches use confusing codesPrefix 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.