BR-KSA-63
If the buyer country code (BT-55) is "SA", then these fields are mandatory:street name (BT-50), building number (KSA-18), postal code (BT-53), city (BT-52), District (KSA-4), country code (BT-55).For more information please access this link:https://splonline.com.sa/en/national-address-1/
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.
cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country[cbc:IdentificationCode = 'SA']
(exists(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:StreetName) and //cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:StreetName != '' and exists(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:BuildingNumber) and //cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:BuildingNumber != '' and exists(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:PostalZone) and //cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:PostalZone != '' and exists(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CityName) and //cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CityName != '' and exists(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CitySubdivisionName) and //cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CitySubdivisionName != '' and exists(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode) and //cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode != '')
Checked with Saudi Arabia ZATCA Tax Invoice (UBL), Saudi Arabia ZATCA Simplified Tax Invoice (UBL)