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

ERROR

EN 16931 code-list rule (BR-CL)

Context and Significance

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".

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

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