Skip to main content

BR-CL-23 Unit code must come from UN/ECE Rec 20 with Rec 21

Unit of measure codes, such as the invoiced quantity unit (BT-130) and the item price base quantity unit (BT-150), must come from UN/ECE Recommendation 20, including the Rec 21 codes with the prefix X.

Problem Description

WARNING

EN 16931 code-list rule (BR-CL)

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-CL-23 EN 16931 code list rule

Reported in stage 2: EN 16931 rules.

Level warning: on its own, the invoice is still accepted.

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-CL-23: EN 16931 code list 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

Use a valid code in exactly the listed spelling, e.g. C62 (one; the most common code for counted items and the code Invoice Converter writes), H87 (piece; use it when the recipient asks for it), KGM (kilogram), MTR (metre), LTR (litre), HUR (hour) or DAY (day). Packaging units from Rec 21 take the prefix X, e.g. XBX (box). PCE and PCS are not valid codes.

Quick actions

Context and Significance

The EN 16931 validation artefacts flag this rule as fatal; the KoSIT configuration for XRechnung 3.0.2 lowers it to a warning. The rule checks the unitCode attribute of cbc:InvoicedQuantity, cbc:BaseQuantity and cbc:CreditedQuantity in UBL, and of ram:BilledQuantity and ram:BasisQuantity in CII. It fails when an ERP exports its own unit abbreviations such as "PCS", "pcs" or "h"; the check is case-sensitive. Map every ERP unit to one Rec 20 code in the master data. Example: 10 pieces are usually sent as unitCode="C62" (or "H87" if the recipient asks), 2.5 hours as unitCode="HUR".

Valid Examples

  • BT-130 = C62 — one (unit)
  • BT-130 = H87 — piece
  • BT-130 = KGM — kilogram

Invalid Examples

  • BT-130 = PCS — not a Rec 20 code; use C62 or H87
  • BT-130 = h — local abbreviation; use HUR

Code Examples

Valid XML
<cbc:InvoicedQuantity unitCode="C62">10</cbc:InvoicedQuantity>
Invalid XML
<cbc:InvoicedQuantity unitCode="PCS">10</cbc:InvoicedQuantity>

Affected Fields

Validation Tools