All rules · pint-eu · error

PEPPOL-EN16931-R120

The invoice line net amount must equal quantity x item net price, after any line-level allowances and charges, rounded to two decimals.

Reviewed

Why this rule exists

Line arithmetic is the foundation the document totals are checked against. If a line does not reconcile, every total above it is unverifiable, so this is caught at the line rather than at the bottom of the document.

Why it usually happens

How to fix it

Compute line amounts with a fixed-point decimal type, round once at the end, and let the rounded value be the one you serialize.

Wrong
<cbc:InvoicedQuantity unitCode="EA">3</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="AED">100.00</cbc:LineExtensionAmount>
<cac:Price><cbc:PriceAmount currencyID="AED">33.33</cbc:PriceAmount></cac:Price>
Right
<cbc:InvoicedQuantity unitCode="EA">3</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="AED">99.99</cbc:LineExtensionAmount>
<cac:Price><cbc:PriceAmount currencyID="AED">33.33</cbc:PriceAmount></cac:Price>

The official rule

Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount

Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.

Schematron test

u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, 0.02)

Applied to nodes matching cac:InvoiceLine | cac:CreditNoteLine

Rule-pack versions

Rule-packLayerSeverityApplies to
pint-eu-1.1.1pint-euerrorbilling/creditnote, billing/invoice

Related rules

ibr-co-10 · ibr-co-13 · aligned-ibrp-004

Check your own invoice

Paste your XML and see every rule that fires, not just this one. Free, no sign-up, and we never store the document.

Open the validator