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

ERROR

Peppol BIS Billing 3.0 rule (OpenPeppol)

Context and Significance

PEPPOL-EN16931-R130 only runs when cbc:BaseQuantity is present and compares its unitCode with the unitCode of the invoiced quantity. Different units on one line make the unit price calculation ambiguous, for example a quantity in hours priced per piece. The error usually appears when the price list stores a different unit than the order line, or when a default unit such as C62 is written into BaseQuantity.

Solution

In your ERP product catalog or unit conversion settings, align the unit of the price base quantity (BT-150) with the line billing unit (BT-130). In UBL 2.1, make sure <cbc:BaseQuantity unitCode="H87"> carries exactly the same unitCode attribute as <cbc:InvoicedQuantity unitCode="H87">. If the price applies to one unit, you may omit cbc:BaseQuantity 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)
  • 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