VRBL-INV-AE-1p0-94

Basic Info

Rule The Buyer Tax Company ID MUST be provided when the scheme identifier is '0235' and the Buyer Endpoint ID is not a 10-digit number starting with 1.
Context /ubl:Invoice/cac:AccountingCustomerParty/cac:Party
Pattern vrbl-invoice-AE-1p0
Severity fatal

Implementation

not(cbc:EndpointID/@schemeID = '0235')
or
(
	string-length(cbc:EndpointID) = 10
	and starts-with(cbc:EndpointID, '1')
	and translate(cbc:EndpointID, '0123456789', '') = ''
)
or
cac:PartyTaxScheme/cbc:CompanyID