Important considerations for electronic invoicing
This means that using processing methods to exclude fields should be avoided. Please be aware that the validation includes a check that price*quantity-discount fits the line amount, and also that all lines with amounts actually exist in the invoice, as all line amounts are checked against the invoice totals and a calculation is run to make sure they also fit the VAT amounts set on the invoice.
Try not to use any “special” handlings on order lines. Things that in
particular will be guaranteed to cause failures if sending an electronic invoice:
- Negative price. If the line is to be negative, set negative quantity, not price. Negative prices are against general format rules.
- Setting price in Price after discount. We depend on prices being set in Price, as we calculate discounts based on the difference between Price and Price after discount. If the line price is set in Price after discount, the invoice line in the XML will have a price of 0, while having a quantity and a line amount, causing a failure in validation.
- Using the Order processing parameter "Rounding of VAT amount on order lines". Order line VAT amounts must be unrounded to make sure the sum of order line VAT amounts matches the invoice VAT amount, as this will cause validation errors.