# BT-130 Invoice line quantity unit of measure code

The unit of measure applicable to the quantity in the invoice line. Must use UNECE Recommendation 20 or 21 codes.

## Quick answer

> **Line items**: The goods or services on each invoice line, including quantities, prices, and VAT.

- [Validate XML](/en/xrechnung-validator?source=resource&bt=BT-130)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&bt=BT-130)

## In plain language

Specifies the unit of measurement for the quantity to ensure accurate interpretation.

## What you usually enter here

Three-letter code from UNECE Recommendation 20/21

Typical valid values include: EA, HUR, KGM, LTR

Mandatory for every invoice line under EN 16931-1 (BR-23).

## Where the field sits

BT-130 belongs to the Lines part of the invoice. UBL 2.1 Syntax: Invoice › cac:InvoiceLine › cbc:InvoicedQuantity @unitCode. CII (UN/CEFACT) Syntax: rsm:CrossIndustryInvoice › rsm:SupplyChainTradeTransaction › ram:IncludedSupplyChainTradeLineItem › ram:SpecifiedLineTradeDelivery › ram:BilledQuantity @unitCode.

## What goes wrong often

Avoid values like: each, kg, 999

Relevant rule codes: BR-23, BR-CL-23

## Valid Examples

- EA
- HUR
- KGM
- LTR
- MTK
- MTR
- PCE

## Invalid Examples

- each
- kg
- 999

## Related Fields

- [BT-129 Invoice line quantity](/resources/xrechnung/bt-129-invoice-line-quantity)
- [BT-131 Invoice line net amount](/resources/xrechnung/bt-131-invoice-line-net-amount)

## XML mapping and field facts

Open the technical reference if you need XML paths, validator rule codes, legal wording, or schema-specific mapping details.

### Field ID:
BT-130

### Data Type:
code

### Cardinality:
1..1

### Requirement:
Mandatory

### Max Length:
3 characters

### Since Version:
XRechnung 1.0+

## XML Implementation

### UBL 2.1 Syntax
```
/Invoice/cac:InvoiceLine/cbc:InvoicedQuantity/@unitCode
```

### CII (UN/CEFACT) Syntax
```
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode
```

## Validation Rules

### BR-23
BR-23

### BR-CL-23
BR-CL-23

## Create an XRechnung from your PDF and confirm the BT-130 code

The converter determines the code from the details on the invoice. You see the value before download and can correct it; the invoice is checked against the XRechnung rules. Already have an XML file? The free validator reports findings for this field, for example BR-CL-23, BR-23.

- [Convert invoice](/en/pdf-to-xrechnung)
- [Validate XML](/en/xrechnung-validator)

Trying it and buying a single conversion work without an account. Subscriptions from €10/month with annual billing (excl. taxes), or €5 per conversion (excl. taxes) without a subscription.

## Official sources and tools

- [KoSIT Validator](https://erechnungsvalidator.service-bw.de/)
- [XRechnung Standard](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
