# BR-07

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

> An Invoice shall contain the Buyer name (BT-44).

- 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(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) != ''`

> An Invoice shall contain the Buyer name (BT-44).

- 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:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name) != ''`

> An Invoice shall contain the Buyer name (BT-44).

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

> An Invoice shall contain the Buyer name (BT-44).

- 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:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name!='')`

## Why it fails

- The buyer's legal name is missing: UBL keeps it in `cac:PartyLegalEntity/cbc:RegistrationName` of the customer party; a `cac:PartyName` alone doesn't count.

## How to fix it

- Add `cac:PartyLegalEntity/cbc:RegistrationName` to the buyer party (`ram:BuyerTradeParty/ram:Name` in CII).

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