BR-RO-202
Daca Codul tarii de livrare (BT-80) este RO si Subdiviziunea tarii de livrare (BT-79) este "RO-B" (corespunzator Municipiului Bucuresti), atunci Localitatea de livrare (BT-77) trebuie sa fie codificata folosind lista de coduri SECTOR-RO. #If the Delivery to country code (BT-80) is RO and the Delivery to country subdivision (BT-79) is "RO-B" (corresponding to Bucharest Municipality), then the Delivery to city(BT-77) must be coded using the code list SECTOR-RO(SECTOR1, SECTOR2, SECTOR3, SECTOR4, SECTOR5, SECTOR6).
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.
[BR-RO-200] Daca Codul tarii de livrare (BT-80) este RO si Subdiviziunea tarii de livrare (BT-79) este "RO-B" (corespunzator Municipiului Bucuresti), atunci Localitatea de livrare (BT-77) trebuie sa fie codificata folosind lista de coduri SECTOR-RO. #If the Delivery to country code (BT-80) is RO and the Delivery to country subdivision (BT-79) is "RO-B" (corresponding to Bucharest Municipality), then the Delivery to city(BT-77) must be coded using the code list SECTOR-RO(SECTOR1, SECTOR2, SECTOR3, SECTOR4, SECTOR5, SECTOR6).
/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address | /ubl:CreditNote/cac:Delivery/cac:DeliveryLocation/cac:Address
normalize-space(cac:Country/cbc:IdentificationCode) = 'RO' and normalize-space(cbc:CountrySubentity) = 'RO-B' and not(normalize-space(cbc:CityName) = $SECTOR-RO-CODES)
Checked with Romania RO e-Factura Invoice (UBL), Romania RO e-Factura Credit Note (UBL)