# BR-02 Invoice number is required

An invoice shall have an Invoice number (BT-1) that uniquely identifies the document for the issuer.

## Problem Description

An invoice shall have an Invoice number (BT-1) that uniquely identifies the document for the issuer.

> **ERROR**: XRechnung 3.0

## Context and Significance

This is a core EN16931 rule; the invoice number is the primary reference for reconciliation, payment matching and audit, so it is mandatory.

## Solution

Populate cbc:ID with the sequential invoice number used in your accounting system; it must not be empty.

- validate
- convert

## Valid Examples

- BT-1 = RE-2024-0001 — a non-empty unique document number

## Invalid Examples

- cbc:ID is absent, or present as an empty <cbc:ID></cbc:ID> element

## Code Examples

### Valid XML
```
<cbc:ID>RE-2024-0001</cbc:ID>
<cbc:IssueDate>2024-05-01</cbc:IssueDate>
```

### Invalid XML
```
<cbc:CustomizationID>urn:cen.eu:en16931:2017</cbc:CustomizationID>
<cbc:IssueDate>2024-05-01</cbc:IssueDate>
```

## Affected Fields

- [BT-1 Invoice number](/resources/xrechnung/bt-1-invoice-number)

## Related Rules

- [BR-03](/resources/kosit-validator-errors/br-03-invoice-issue-date-required)
- [BR-04](/resources/kosit-validator-errors/br-04-invoice-type-code-required)

## 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.
