BR-23: Invoiced quantity unit of measure code (BT-130) is missing
Official message
[BR-23] An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).
[BR-23] An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).
[BR-23] An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).
- Severity
- Error The invoice is invalid and may be rejected by the recipient.
- Applies to
- EN 16931 (CII), EN 16931 (UBL), Factur-X / ZUGFeRD EN 16931
- Affected fields
- BG-25, BT-130
What does this mean?
Every invoice line (BG-25) must state the unit of the quantity (Invoiced quantity unit of measure code, BT-130). The attribute unitCode on the quantity is missing for at least one line.
Typical causes
The quantity was written without a unit.
The unit appears as text in the item name (e.g. "hours") instead of as a code.
How to fix the error
State the unit code according to UN/ECE Recommendation 20 or 21 on the quantity, e.g. C62 (one/piece), HUR (hour), DAY (day) or KGM (kilogram).
CII: ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode, UBL: cbc:InvoicedQuantity/@unitCode or cbc:CreditedQuantity/@unitCode.
Generate and validate the invoice again.
In E-Rechnungsfreund
In the invoice form, section "Rechnungspositionen (BG-25)" (invoice lines), select a unit in the field "ME (BT-130)" (simple view "Einfach": "Einheit") for every line.
Example
Wrong
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity>8</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
Correct
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="HUR">8</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
For developers: test expression per syntax
EN 16931 (CII) (CII)
Context: //ram:IncludedSupplyChainTradeLineItem
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)
EN 16931 (UBL) (UBL)
Context: cac:InvoiceLine | cac:CreditNoteLine
exists(cbc:InvoicedQuantity/@unitCode) or exists(cbc:CreditedQuantity/@unitCode)
Factur-X / ZUGFeRD EN 16931 (CII)
Technical ID in the source: FX-SCH-A-000202
Context: //ram:IncludedSupplyChainTradeLineItem
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)
Related validation rules
Last updated:
Explanation of the validation rule, not legal or tax advice.