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)

Interactive pipeline

Click a stage to see what it checks, or type a rule ID to light up the stage that reports it.

Try:

BR-23 EN 16931 core rule

Reported in stage 2: EN 16931 rules.

Level error: the report recommends rejecting the invoice.

Stage 2 · What it checks

  • The core business terms are present (BR-01 to BR-65).
  • Totals add up and related fields agree (BR-CO); codes and decimals are valid (BR-CL, BR-DEC).
  • Each VAT category is consistent: S, Z, E, AE, K, G, O, L, M (BR-S, BR-Z, BR-AE, BR-IC …).

Example codes

Typical fix

Recalculate totals and VAT from the line data, and correct the VAT category in the source data.

A validator checks an e-invoice in stages. First the file must be well-formed XML that matches the UBL or CII schema (XSD). Then the EN 16931 business rules run: BR core rules, BR-CO calculations, BR-CL code lists, BR-DEC decimals and VAT-category rules such as BR-S. Next come the national or network rules that BT-24 selects: BR-DE for XRechnung, PEPPOL-EN16931 for Peppol BIS Billing. The report lists every failed rule: one error means reject, warnings alone still mean accept. BR-23: EN 16931 core rule, reported in the stage “EN 16931 rules”. Rule sets: KoSIT validator 1.6.3 with the XRechnung configuration of 31 Aug 2026 (EN 16931 artefacts 1.3.16), Peppol BIS Billing 3.0.21.

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

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.

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