What does BR-CL-23 mean?
The unit of measure of every invoice line must be a code from UN/ECE Recommendation 20 (with the Rec 21 extension) - not free text such as "piece" or "hr". By far the most common error in self-built e-invoices.
Common causes of BR-CL-23
- Unit of measure entered as plain text ('piece', 'pc', 'hr') instead of a code.
- Self-invented or outdated abbreviations such as 'PCE' instead of 'C62'/'H87'.
- No mapping from the internal unit names in the ERP system to the UN/ECE codes.
How to fix BR-CL-23
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-130 along this XPath:
//ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode - Apply the fix. Code the unit of measure of the invoice line (BT-130) in the unitCode attribute with a code from UN/ECE Recommendation 20 (including the Rec 21 extension), not as plain text such as 'piece' or 'kg'. Examples: 'C62' (one/unit), 'H87' (piece), 'KGM' (kilogram), 'LTR' (litre), 'MTR' (metre), 'HUR' (hour), 'DAY' (day).
- Validate again. Save the file and validate it again to check that BR-CL-23 is no longer reported.
Code the unit of measure of the invoice line (BT-130) in the unitCode attribute with a code from UN/ECE Recommendation 20 (including the Rec 21 extension), not as plain text such as 'piece' or 'kg'. Examples: 'C62' (one/unit), 'H87' (piece), 'KGM' (kilogram), 'LTR' (litre), 'MTR' (metre), 'HUR' (hour), 'DAY' (day).
//ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCodeBefore / after: the XML example
This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).
<ram:BilledQuantity unitCode="Stueck">2.0</ram:BilledQuantity>
<ram:BilledQuantity unitCode="C62">2.0</ram:BilledQuantity>
Frequent questions about BR-CL-23
Where do I find the right code for my unit?
Is 'PCE' allowed for piece?
Related error codes
Check BR-CL-23 automatically
Instead of digging through the XML by hand you can validate your ZUGFeRD or XRechnung file online – upload the PDF or the XML and you get every error with rule ID, affected field, fix and XPath, as a readable report or as JSON through the API.