Understand Delivery Note asset and hook scoping
Verify that CSS and JavaScript load only where the module code requires them.
Exact navigationTechnical inspection → Delivery Note hooks and invoice/module pages
What this guide covers
Verify that CSS and JavaScript load only where the module code requires them. 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 non-invoice admin page and confirm Delivery Note assets are absent.
- Open the Delivery Note register and confirm its CSS/JavaScript load.
- Open an invoice editor and confirm invoice UI assets load only when enabled.
- Open an eligible client invoice and confirm only the client button asset is injected.
Fields, choices and supported possibilities
- Admin head/footer hooks
- Customer head/footer hooks
- Invoice add/update filters and actions
- Asset version query derived from file modification time
Code-backed validations and workflow rules
- The master enabled option gates all hooks.
- Admin assets are limited to module pages or eligible invoice pages.
- Client assets load only when an authorised invoice has a non-void note.
- The module makes no core theme or server changes.
Expected result and verification
- The feature works without unnecessary global asset loading or unrelated UI effects.
Checks, security and troubleshooting
- Treat `_safe_backup_*` and unused public JavaScript as excluded implementation artefacts, not active features.
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.
