Delivery notes drive the invoice, not the other way round
Material goes out against a delivery note, quantities are confirmed at the gate, and the invoice is raised afterwards against what was actually received. The invoice therefore inherits data from a document that often lives outside the accounting system entirely.