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-23 — E-Invoice Validation Rule & Fix

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

1. Why This Rule Triggers (Diagnostic Message)

Line 1 has no unit of measure code (BT-130). EN 16931 requires a code from UN/ECE Recommendation 20, not a free-text unit — "hours" is not valid, "HUR" is.

2. How to Fix BR-23

Set line.unitCode to the UN/ECE Rec 20 code: "HUR" hours, "DAY" days, "H87" pieces, "C62" one (a unit of anything), "MTR" metres, "KGM" kilograms, "MON" months. resolveUnitCode() turns a unit word such as "Stk" or "hours" into its code.

3. Valid Code / Payload Example

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