VRBL-INV-AE-1p0-93

Basic Info

Rule the Seller Tax ID MUST be exactly 10 numeric digits and start with '1'.
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme
Pattern vrbl-invoice-AE-1p0
Severity fatal

Implementation

not(cac:TaxScheme/cbc:ID = 'VAT' and not(/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode = 'AE'))
or
(
	string-length(cbc:CompanyID) = 10
	and starts-with(cbc:CompanyID, '1')
	and translate(cbc:CompanyID, '0123456789', '') = ''
)