Unit of the price base quantity

Error PEPPOL-EN16931-R130 Peppol

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

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The unitCode of the price base quantity does not match the unitCode of the billed quantity. The two quantities therefore use different units.

What the rule means

The price base quantity and billed quantity must use the same unit so that the product price can be applied to the billed quantity consistently.

Please use the same unit for the price base and billed quantities

The price base quantity and the billed quantity on an invoice line use different units. Their unit codes must match so the price relates to the billed quantity correctly.

What to do
  1. Compare the unitCode attribute of ram:BasisQuantity with the unitCode attribute of ram:BilledQuantity.
  2. Make sure both unit codes match.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
<ram:BilledQuantity unitCode="HUR">2</ram:BilledQuantity>
✓ Correct
<ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
<ram:BilledQuantity unitCode="C62">2</ram:BilledQuantity>
Technical details

The XPath directly compares the current ram:BasisQuantity unitCode with the unitCode of ram:BilledQuantity in the associated invoice line.

Where the rule applies

The rule applies to the unitCode attribute of ram:BasisQuantity in a product’s net or gross price and compares it with the unitCode of the invoice line’s billed quantity.

Context (rule/@context)
ram:NetPriceProductTradePrice/ram:BasisQuantity[@unitCode] | ram:GrossPriceProductTradePrice/ ram:BasisQuantity[@unitCode]
Test expression (assert/@test)
@unitCode = ../../../ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode