Peppol BIS Billing 3.0.21 · UBL

PEPPOL-EN16931-R120: Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base…

Peppol BIS Billing 3.0.21 · UBL

fatalformat

Original rule text

[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

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

PEPPOL-EN16931-R120 is a fatal rule in the format layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected.

What this rule requires

The rule requires that the invoice line net amount (cbc:LineExtensionAmount) on an cac:InvoiceLine or cac:CreditNoteLine equals the calculated line amount: the quantity (cbc:InvoicedQuantity for invoices, cbc:CreditedQuantity for credit notes) multiplied by the item net price (cac:Price/cbc:PriceAmount) divided by the price base quantity (cac:Price/cbc:BaseQuantity, defaulting to 1 if absent or zero), plus the sum of line charges, minus the sum of line allowances. The test allows a tolerance of 0.02, so the values must match within that slack. Charges and allowances come from cac:AllowanceCharge elements, where cbc:ChargeIndicator is true for charges and false for allowances, and their cbc:Amount values are summed and rounded to two decimals before comparison.

How to fix

Recalculate cbc:LineExtensionAmount as (quantity * (cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity)) + sum of charge cbc:Amount - sum of allowance cbc:Amount, using the same quantity element appropriate to the document type (cbc:InvoicedQuantity or cbc:CreditedQuantity). If the current value differs by more than 0.02, correct cbc:LineExtensionAmount to the calculated value, or adjust one of the input values (quantity, price amount, base quantity, or charge/allowance amounts) so that the formula holds. Ensure the calculation uses the same rounding as the rule (amounts rounded to two decimals for charge and allowance totals).

Guidance on this rule. The original text above is authoritative.

Where to go next

No published Peppol BIS Billing UBL release comparison lists a change to PEPPOL-EN16931-R120.

Validate an invoice against these rules · All release changes