# BR-23 Each invoice line quantity must have a unit code

An invoice line (BG-25) must contain the unit of measure code for the invoiced quantity (BT-130).

## Problem Description

An invoice line (BG-25) must contain the unit of measure code for the invoiced quantity (BT-130).

> **ERROR**: XRechnung 3.0

## Context and Significance

Unit codes are controlled values. Free-text units such as "Stück" or "hours" fail validators even when the quantity itself is present.

## Solution

Set BT-130 to a valid unit code such as C62 for piece, HUR for hour, or DAY for day.

- validate
- convert

## Valid Examples

- BT-130 = C62
- BT-130 = HUR

## Invalid Examples

- BT-130 missing
- Unit written as "piece" instead of C62

## Technical Details

### Affected Fields
BT-130 Invoiced quantity unit of measure code

## Related Rules

- [BR-22](/resources/kosit-validator-errors/br-22-invoice-line-quantity-must-be-present)
- [PEPPOL-EN16931-R130](/resources/kosit-validator-errors/peppol-en16931-r130-price-base-unit-code-must-match-quantity-unit)

## Validation Tools

- [Official KoSIT Validator](https://erechnungsvalidator.service-bw.de/): Validate your XRechnung files against all BR-DE rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Automatic validation error fixes when converting.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Complete Error List](/resources/kosit-validator-errors): Overview of all German XRechnung validation rules.
