RO-EFACTURA-BR-RO-Z2: Romanian Seller & Buyer CountrySubentity (BT-39 / BT-54) must use valid ISO 3166-2:RO county codes (e.g. RO-B, RO-CJ) and Sector 1-6 for Bucharest
This fatal rule enforces the Romanian CIUS (ro-efactura-cius) requirement that the Seller's and Buyer's Country Subentity (BT-39 and BT-54 respectively) must be a valid ISO 3166-2:RO county code. The context XPath selects the CountrySubentity element within the Seller's PostalAddress (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity). The Schematron test uses the XPath 2.0 matches() function with the regular expression '^RO-[A-Z]{1,2}$'. This pattern requires the string to start with 'RO-', followed by one or two uppercase letters (A-Z), and nothing else. The rule triggers when the CountrySubentity value does not match this pattern. Note: The assertion message also mentions 'Sector 1-6 for Bucharest', but the provided XPath test does not accommodate that; it only allows codes like 'RO-B' or 'RO-CJ'. This discrepancy may indicate that the rule is incomplete or that the message is broader than the test. In practice, for Bucharest, the ISO 3166-2:RO code is 'RO-B', which matches the pattern, so the sector requirement might be handled elsewhere or is a misinterpretation. The rule is fatal, meaning the invoice will be rejected if violated.
1. Identify the cbc:CountrySubentity element within the PostalAddress of both AccountingSupplierParty and AccountingCustomerParty. 2. Replace its text content with the appropriate ISO 3166-2:RO code for the county or Bucharest. Use the format 'RO-' followed by one or two uppercase letters (e.g., 'RO-B' for Bucharest, 'RO-CJ' for Cluj, 'RO-TM' for Timiș). 3. Ensure that the code is exactly as per ISO 3166-2:RO; do not use full county names or other formats. 4. If the element is missing, add it with the correct code. 5. Validate the invoice against the ro-efactura-cius Schematron to confirm compliance.
Missing <cbc:CustomizationID> or value does not declare EN 16931 CIUS compliance.
fix: Insert <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>.
Missing <cbc:EndpointID schemeID="..."> inside <cac:AccountingSupplierParty>/<cac:Party>.
fix: Add <cbc:EndpointID schemeID="9930">DE123456789</cbc:EndpointID> as the first child of Seller <cac:Party>.
No <cbc:BuyerReference> (BT-10) found. Mandatory in XRechnung 3.0 (BR-DE-15) and required in Peppol BIS 3.0 (PEPPOL-EN16931-R003) when OrderReference is absent.
fix: Insert <cbc:BuyerReference>991-12849-74</cbc:BuyerReference> in the document header.
ANAF SPV requires exact CustomizationID urn:cen.eu:en16931:2017#compliant#urn:efactura.mfinante.ro:CIUS-RO:1.0.1.
fix: Set cbc:CustomizationID to ANAF CIUS-RO:1.0.1 URN.
Romanian ANAF CIUS-RO requires ISO 3166-2:RO county codes (e.g. RO-B, RO-CJ).
fix: Insert <cbc:CountrySubentity>RO-B</cbc:CountrySubentity> inside PostalAddress.