Answer
Use the Alt Delivery Note No field's own configurable numbering rather than trying to reformat the standard Delivery Note Number itself — that alternate field exists specifically to let different users/processes have differently-formatted delivery note numbers. Configure it from the Branch window: create (or open) a Branch, right-click and go to Delivery Note Series, and define the numbering pattern you want there. Make sure the Branch is actually connected to the relevant Site in the Site window, since the numbering series is applied through that Branch-to-Site connection.