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...).
In English If the seller's country code (BT-40) is RO, the seller's country subdivision (BT-39) must be an ISO 3166-2:RO code, such as RO-B for Bucharest or RO-AB for Alba County.
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.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element
/ubl:Invoice | /cn:CreditNote
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)
Checked with Romania RO e-Factura Invoice (UBL), Romania RO e-Factura Credit Note (UBL)