SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL Official EN 16931 / Peppol / CIUS Rule BT/BG Fields: BT-130

BR-CL-23 — E-Invoice Validation Rule & Fix

Fixture ID: badUnit · XPath: /ubl:Invoice/cac:InvoiceLine[1]/cbc:InvoicedQuantity/@unitCode

1. Why This Rule Triggers (Diagnostic Message)

Line 1 has a unit of measure code (BT-130) of "hours", which is not in UN/ECE Recommendation 20 (with the Rec 21 extension). The unit is a code, not a word: "hours", "Stk", "each" and "pcs" are all rejected, and so is a valid code in the wrong case.

2. How to Fix BR-CL-23

Set line.unitCode to "HUR" (Rec 20: "hour"), which is what "hours" stands for. resolveUnitCode() in this package does the same for the common English, German and French unit words, so a unit your system stores as a word can be converted before it reaches the invoice.

3. Valid Code / Payload Example

"quantity": 10, "unitCode": "HUR"
Test & Validate XML / JSON in Live SchemaGuard Validator →