# BR-02

Source: https://xmlvalid.com/rules/BR-02

> An Invoice shall have an Invoice number (BT-1).

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), EXTENDED-CTC-FR rules (UBL) 1.4.0.04
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `normalize-space(cbc:ID) != ''`

> An Invoice shall have an Invoice number (BT-1).

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `/rsm:CrossIndustryInvoice`
- Test: `normalize-space(rsm:ExchangedDocument/ram:ID) != ''`

> An Invoice shall have an Invoice number (BT-1).

- Level: error
- Rule sets: Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `(cbc:ID) !=''`

> An Invoice shall have an Invoice number (BT-1).

- Level: error
- Rule sets: Factur-X BASIC WL rules 1.09, Factur-X EN 16931 rules 1.09.2, Factur-X EXTENDED rules 1.09.2
- Context: `/rsm:CrossIndustryInvoice`
- Test: `(rsm:ExchangedDocument/ram:ID !='')`

## Why it fails

- The invoice number in `cbc:ID` (`rsm:ExchangedDocument/ram:ID` in CII) is missing or empty.

## How to fix it

- Give the invoice its number (BT-1), the one the seller's accounting uses to identify it.

Validate a document against these rules: https://xmlvalid.com/validate
