E-invoice rule explained · EN 16931
BR-CL-23: Unit of measure is not a UN/ECE Recommendation 20/21 code
Official message
Unit code MUST be coded according to the UN/ECE Recommendation 20 with Rec 21 extension
- Severity
- Error (the invoice is rejected)
- Checked in
- UBL, CII
What does BR-CL-23 mean?
The unitCode on the invoiced quantity (BT-130) and on the price base quantity (BT-150) must be a code from UN/ECE Recommendation 20 or 21, written exactly as listed. Common ones are C62 (one/unit), H87 (piece), HUR (hour), DAY (day), MON (month), KGM (kilogram), MTR (metre), LTR (litre) and LS (lump sum).
Usual causes
- A label from the invoicing software or the printed invoice was used, such as "Stk", "pcs", "h" or "pce".
- The code is in lower case (hur) or has a space in it.
- A unit was mapped to a code that looks plausible but is not on the list.
How do I fix BR-CL-23?
- Map each unit in your software to its Recommendation 20/21 code, for example piece to H87, hour to HUR, flat fee to LS.
- Write the code exactly, in capitals, in the unitCode attribute of cbc:InvoicedQuantity / cbc:BaseQuantity (CII: ram:BilledQuantity / ram:BasisQuantity).
- Keep the readable label for the PDF if you like; only the code goes in the XML attribute.
Corrected XML (minimal example we wrote)
UBL
<cbc:InvoicedQuantity unitCode="HUR">8</cbc:InvoicedQuantity>
CII
<ram:SpecifiedLineTradeDelivery> <ram:BilledQuantity unitCode="HUR">8</ram:BilledQuantity> </ram:SpecifiedLineTradeDelivery>
Example values only. Put the elements in place of, or beside, what your file has; element order matters in both syntaxes.
Check your file for free
The free checker runs the official EN 16931, XRechnung and Peppol rules in your browser. Your file is not uploaded.
In development — early access
Fix-and-explain for accountants and invoicing teams
A paid service that explains every failed rule in plain German, French, Dutch or English and proposes a corrected file is in development. Early access
Source
Rule id and official message from the CEN/TC 434 EN 16931 validation artefacts, validation-1.3.17 (EUPL-1.2), compiled from upstream commit 6e35e0a. The explanation, causes, fix and XML on this page are our own, not the rule publisher's. CEN/TC 434 EN 16931 validation artefacts validation-1.3.17