VRBL-INV-AE-1p0-76

Basic Info

Rule Either Buyer Party Identification ID or Buyer Tax Company ID MUST be present when the Profile is not an Export, Scheme ID is '0235', and the Endpoint is not a 10-digit ID starting with 1.
Context /ubl:Invoice/cac:AccountingCustomerParty/cac:Party
Pattern vrbl-invoice-AE-1p0
Severity fatal

Implementation

not(cbc:EndpointID/@schemeID = '0235')
	or
(/ubl:Invoice/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:ExportIndicator = 'true')
or
(
	string-length(cbc:EndpointID) = 10
	and starts-with(cbc:EndpointID, '1')
	and translate(cbc:EndpointID, '0123456789', '') = ''
)
or
(cac:PartyIdentification/cbc:ID or cac:PartyTaxScheme/cbc:CompanyID)