VRBL-INV-PT-2p1-166

Basic Info

Rule The value of the Allowance Charge Tax Scheme ID must be contained in Tax Scheme ID [VRBL-CL-PT-TaxScheme-ID].
Context /ubl:Invoice/cac:AllowanceCharge/cac:TaxCategory/cac:TaxScheme/cbc:ID
Pattern vrbl-invoice-pt-2p1
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-PT-TaxScheme-ID

Implementation

not(boolean(.))
or
(
	(
		not(
			contains(
				normalize-space(.),
				substring($VRBL-CL-PT-TaxScheme-ID, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-PT-TaxScheme-ID,
			concat(
				substring($VRBL-CL-PT-TaxScheme-ID, 1, 1),
				normalize-space(.),
				substring($VRBL-CL-PT-TaxScheme-ID, 1, 1)
			)
		)
	)
)