PEPPOL-EN16931-R130
Unit code of price base quantity MUST be same as invoiced quantity.
Why it fails
- The base quantity of the price has a different
unitCodefrom 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.
cac:Price/cbc:BaseQuantity[@unitCode]
not($hasQuantity) or @unitCode = $quantity/@unitCode
Checked with Peppol BIS Billing 3.0 Invoice, Peppol BIS Billing 3.0 Credit Note
ram:NetPriceProductTradePrice/ram:BasisQuantity[@unitCode] | ram:GrossPriceProductTradePrice/ram:BasisQuantity[@unitCode]
@unitCode = ../../../ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode
Checked with XRechnung 3.0 Invoice (CII)