PEPPOL-EN16931-R130

Unit code of price base quantity MUST be same as invoiced quantity.

error: the document is invalid Peppol documentation ↗

Why it fails

  • The base quantity of the price has a different unitCode from the invoiced quantity (prices per kilogram, quantities in pieces).

How to fix it

Use the same unit for both, and convert the price if needed.

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:Price/cbc:BaseQuantity[@unitCode]
Test
not($hasQuantity) or @unitCode = $quantity/@unitCode

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

Context
ram:NetPriceProductTradePrice/ram:BasisQuantity[@unitCode] | ram:GrossPriceProductTradePrice/ram:BasisQuantity[@unitCode]
Test
@unitCode = ../../../ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode

Checked with XRechnung 3.0 Invoice (CII)