# BR-RO-110

Source: https://xmlvalid.com/rules/BR-RO-110

> Daca Codul tarii Vanzatorului (BT-40) este RO, atunci Subdiviziunea tarii Vanzatorului (BT-39) trebuie sa fie codificata folosind lista de coduri ISO 3166-2:RO (ex. "RO-B" pentru Municipiul Bucuresti, "RO-AB" pentru judetul Alba...). #If the Seller's country Code (BT-40) is RO, then the Seller's country subdivision (BT-39) must be coded using the ISO 3166-2: RO code list (ex. "RO-B" for Bucharest, "RO-AB" for Alba County...).

- Level: error
- Rule sets: Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode) = 'RO' and not(normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) = $ISO-3166-RO-CODES)`

## Why it fails

- The seller's address in Romania has no `cbc:CountrySubentity`, or it holds the county name (`Cluj`) or the code without its prefix (`CJ`).

## How to fix it

- Write the county as its ISO 3166-2:RO code: `RO-CJ` for Cluj, `RO-AB` for Alba, `RO-B` for Bucharest. BR-RO-111, BR-RO-170 and BR-RO-212 ask the same for the buyer, the tax representative and the delivery address.

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