Skip to main content

BR-23 Invoiced quantity unit of measure code must be specified

Under EN 16931 rule BR-23, each invoiced quantity in BT-129 must have an associated unit of measure code in BT-130 (@unitCode). The unit code must be selected from the UN/ECE Recommendation 20 / Recommendation 21 code list (e.g. "H87" for piece, "C62" for one, "KGM" for kilogram, "MTR" for meter, "HUR" for hour, or "DAY" for day). Omitting the unitCode attribute leaves the invoiced physical dimension ambiguous.

Problem Description

ERROR

EN 16931 core business rule (CEN)

Context and Significance

This is an EN 16931 core rule. A quantity without a unitCode attribute fails BR-23; an attribute with an empty or unknown code fails the code list rule BR-CL-23 instead. BR-23 usually appears when the export has no unit mapping and writes the bare quantity, while an ERP unit such as "pcs" copied into unitCode triggers BR-CL-23.

Solution

In your ERP master data or invoice line configuration, ensure every invoiced quantity exports an approved UN/ECE unit code. In UBL 2.1 syntax, populate the unitCode attribute on InvoicedQuantity: <cbc:InvoicedQuantity unitCode="H87">10.00</cbc:InvoicedQuantity>. In UN/CEFACT CII syntax, populate the unitCode attribute on BilledQuantity: <ram:BilledQuantity unitCode="H87">10.00</ram:BilledQuantity>.

Quick actions

Valid Examples

  • Invoice line with BT-129 = 10 and BT-130 = "H87" (10 pieces)
  • Invoice line with BT-129 = 40.5 and BT-130 = "HUR" (40.5 hours)

Invalid Examples

  • cac:InvoiceLine element contains numeric quantity but omits unitCode attribute (<cbc:InvoicedQuantity>10</cbc:InvoicedQuantity>)
  • A credit note line with <cbc:CreditedQuantity>2</cbc:CreditedQuantity> and no unitCode attribute; an empty or unknown unitCode fails the code list rule BR-CL-23 instead

Code Examples

Valid XML
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="H87">10</cbc:InvoicedQuantity>
</cac:InvoiceLine>
Invalid XML
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity>10</cbc:InvoicedQuantity>
</cac:InvoiceLine>

Affected Fields

Validation Tools