BR-RO-100
Daca Codul tarii Vanzatorului (BT-40) este RO si Subdiviziunea tarii Vanzatorului (BT-39) este RO-B (corespunzator Municipiului Bucuresti), atunci Localitatea Vanzatorului (BT-37) trebuie sa fie codificata folosind lista de coduri SECTOR-RO. #If the Seller's country Code (BT-40) is RO and the Seller's country subdivision (BT-39) is RO-B (corresponding to Bucharest Municipality), then the Seller city (BT-37) must be coded using the code list SECTOR-RO(SECTOR1, SECTOR2, SECTOR3, SECTOR4, SECTOR5, SECTOR6).
Why it fails
- The seller is in Bucharest (
cbc:CountrySubentityRO-B) andcbc:CityNameholds the city name (Bucuresti) instead of the sector. - The sector is written another way:
Sector 1,SECTOR 1orS1.
How to fix it
For an address in Bucharest, write the sector in cbc:CityName as one of SECTOR1 to SECTOR6. BR-RO-101, BR-RO-160 and BR-RO-202 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 normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) = 'RO-B' and not(normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CityName) = $SECTOR-RO-CODES)
Checked with Romania RO e-Factura Invoice (UBL), Romania RO e-Factura Credit Note (UBL)