Understand Delivery Note invoice-payload isolation
Explain how module fields are prevented from entering the core invoice insert or update payload.
Exact navigationAutomatic code flow during Admin Area → Invoices → Save
What this guide covers
Explain how module fields are prevented from entering the core invoice insert or update payload. 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
- Submit an invoice with or without Add Delivery Note.
- Confirm the core invoice saves normally.
- Inspect the module’s before-invoice add/update filter.
- Verify delivery-note keys are captured for the module and removed from the invoice data array.
- Verify the after-invoice hook creates or updates only module-owned records.
Fields, choices and supported possibilities
- Checkbox flag and delivery fields are module-only payload keys
- Temporary captured payload is associated with the invoice save request
- Core invoice columns remain unaffected
Code-backed validations and workflow rules
- The isolation filter runs for invoice add and update.
- The module is designed to be portable and makes no invoice-table schema change.
- An invoice update does not create another note when a non-void note already exists.
Expected result and verification
- Core invoicing remains compatible while the optional module workflow receives its own values.
Checks, security and troubleshooting
- Do not add Delivery Note columns to the core invoice table to reproduce this behaviour.
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.
