NAV models a storno as a modifying report: an invoiceReference to the
original, every line's amounts reversed, and each line carrying a
lineModificationReference. Two NAV rules the shape must satisfy, both
learned from the live service: lineOperation is always CREATE on a
modifying line, and the reversing lines take chain positions after the
original (lineNumberReference continues past it) while the document's own
line numbers stay 1..N. Amounts and the summary are negated.
Handles the common single-invoice, first-modification case; chained
modifications (modificationIndex > 1) are the caller's to sequence.
Build a storno (full cancellation) of an invoice.
NAV models a storno as a modifying report: an
invoiceReferenceto the original, every line's amounts reversed, and each line carrying alineModificationReference. Two NAV rules the shape must satisfy, both learned from the live service:lineOperationis alwaysCREATEon a modifying line, and the reversing lines take chain positions after the original (lineNumberReferencecontinues past it) while the document's own line numbers stay 1..N. Amounts and the summary are negated.Handles the common single-invoice, first-modification case; chained modifications (modificationIndex > 1) are the caller's to sequence.