VRBL-INV-AU-1p0-66

Basic Info

Rule The value of the Allowance Charge Tax ID must be contained in Tax Category ID [VRBL-CL-AU-TaxCategoryID].
Context /ubl:Invoice/cac:AllowanceCharge/cac:TaxCategory/cbc:ID
Pattern vrbl-invoice-au-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-AU-TaxCategoryID
showValue = true

Implementation

not(boolean(.))
or
(
	(
		not(
			contains(
				normalize-space(.),
				substring($VRBL-CL-AU-TaxCategoryID, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-AU-TaxCategoryID,
			concat(
				substring($VRBL-CL-AU-TaxCategoryID, 1, 1),
				normalize-space(.),
				substring($VRBL-CL-AU-TaxCategoryID, 1, 1)
			)
		)
	)
)