VRBL-INV-IN-1p0-80

Basic Info

Rule Apart from 'VAT', the value of the Seller Tax Scheme ID must be contained in Tax Scheme ID [VRBL-CL-IN-TaxSchemeID].
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:ID
Pattern vrbl-invoice-in-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-IN-TaxSchemeID

Implementation

(
	. = 'VAT'
)
or
(
	not(boolean(.))
	or
	(
		(
			not(
				contains(
					normalize-space(.),
					substring($VRBL-CL-IN-TaxSchemeID, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-IN-TaxSchemeID,
				concat(
					substring($VRBL-CL-IN-TaxSchemeID, 1, 1),
					normalize-space(.),
					substring($VRBL-CL-IN-TaxSchemeID, 1, 1)
				)
			)
		)
	)
)