Skip to main content

PEPPOL-EN16931-R130 Price base unit code must match invoiced quantity unit code

Under Peppol rule PEPPOL-EN16931-R130, whenever an invoice line specifies an item price base quantity unit of measure code in BT-150 (unitCode on BaseQuantity), its value must be identical to the invoiced quantity unit of measure code in BT-130 (unitCode on InvoicedQuantity). In electronic trade, mixing different units of measure on the same line (such as billing quantity in "H87" pieces while pricing in "KGM" kilograms without conversion) creates ambiguity in automated pricing calculations. Both unitCode attributes must share the same UN/ECE Rec 20 / Rec 21 code.

Problem Description

Under Peppol rule PEPPOL-EN16931-R130, whenever an invoice line specifies an item price base quantity unit of measure code in BT-150 (unitCode on BaseQuantity), its value must be identical to the invoiced quantity unit of measure code in BT-130 (unitCode on InvoicedQuantity). In electronic trade, mixing different units of measure on the same line (such as billing quantity in "H87" pieces while pricing in "KGM" kilograms without conversion) creates ambiguity in automated pricing calculations. Both unitCode attributes must share the same UN/ECE Rec 20 / Rec 21 code.

ERROR

XRechnung 3.0

Context and Significance

Mismatched unit codes between invoiced quantity (BT-130) and price base quantity (BT-150) violate Peppol rule PEPPOL-EN16931-R130.

Solution

In your ERP product catalog or unit conversion settings, align the unit of measure of the price base quantity with the line item billing unit. In UBL 2.1 syntax, ensure that <cbc:BaseQuantity unitCode="H87"> shares the exact same unitCode attribute as <cbc:InvoicedQuantity unitCode="H87">. In UN/CEFACT CII syntax, ensure that <ram:BasisQuantity unitCode="H87"> under <ram:NetPriceProductTradePrice> matches <ram:BilledQuantity unitCode="H87">. If 1:1 unit pricing applies, you may omit the BaseQuantity tag entirely.

Quick actions

Valid Examples

  • InvoicedQuantity unitCode = "H87" (piece) and BaseQuantity unitCode = "H87" (piece)
  • InvoicedQuantity unitCode = "HUR" (hour) and BaseQuantity unitCode = "HUR" (hour)

Invalid Examples

  • InvoicedQuantity specified in "HUR" (hours) while Price BaseQuantity specifies unitCode = "C62" (one/piece)
  • InvoicedQuantity specified in "KGM" (kilograms) while Price BaseQuantity specifies unitCode = "LTR" (liters)

Code Examples

Valid XML
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="H87">100</cbc:InvoicedQuantity>
  <cac:Price>
    <cbc:PriceAmount currencyID="EUR">50.00</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="H87">100</cbc:BaseQuantity>
  </cac:Price>
</cac:InvoiceLine>
Invalid XML
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="H87">100</cbc:InvoicedQuantity>
  <cac:Price>
    <cbc:PriceAmount currencyID="EUR">50.00</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="C62">100</cbc:BaseQuantity>
  </cac:Price>
</cac:InvoiceLine>

Affected Fields

Validation Tools