Understand Delivery Note reference numbering
Explain the generated `DN-YYYYMMDD-INV{id}-sequence` reference and collision fallback.
Exact navigationAdmin Area → Delivery Note → Open note → Reference
What this guide covers
Explain the generated `DN-YYYYMMDD-INV{id}-sequence` reference and collision fallback. This guide follows the supplied Delivery Note module’s live hooks, controller actions, model rules, views and stored side effects.
Exact step-by-step process
- Open a delivery note detail page.
- Read the generated reference.
- Compare the date and source invoice ID with the record.
- Use the reference when tracing email, PDF and event evidence.
Fields, choices and supported possibilities
- Configurable prefix, default `DN`
- Creation date in `YYYYMMDD`
- Source invoice ID
- Four-digit sequence from 0001 to 9999
- Eight-character token-derived fallback after sequence exhaustion
Code-backed validations and workflow rules
- Reference generation checks uniqueness before insert.
- The reference has a unique database index.
- Changing the prefix affects future generated references only; the supplied code has no prefix settings screen.
Expected result and verification
- Every note receives an attributable, unique reference linked visibly to its invoice.
Checks, security and troubleshooting
- Do not overwrite references directly in the database.
Stay within the supported flowDo not force database values, expose secure tokens, bypass permission checks, replace a stored signature or invent a status or interface that the supplied code does not implement.
