PEPPOL-EN16931-R120

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

error: the document is invalid warning: reported, still valid Peppol documentation ↗

Why it fails

  • A line's net amount doesn't equal quantity × (net price ÷ base quantity) plus line charges minus line allowances; often the price has more decimals than were used, or a base quantity (price per 100) was ignored.

How to fix it

Recalculate cbc:LineExtensionAmount from the values in the line. The rule allows a difference of 0.02.

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
cac:InvoiceLine | cac:CreditNoteLine
Test
u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, 0.02)

Checked with Peppol BIS Billing 3.0 Invoice, Peppol BIS Billing 3.0 Credit Note

Context
cac:InvoiceLine | cac:CreditNoteLine
Test
u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, $slackValue)

Checked with XRechnung 3.0 Invoice (UBL), XRechnung 3.0 Credit Note (UBL)

Context
ram:IncludedSupplyChainTradeLineItem
Test
u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, $slackValue)

Checked with XRechnung 3.0 Invoice (CII)