VRBL-INV-EN16931-CM-324

Basic Info

Rule The value of the Charge Reason Code must be contained in UNCL 7161 [VRBL-CL-UNCL-7161].
Context /ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cbc:AllowanceChargeReasonCode
Pattern vrbl-invoice-en16931-codesmodel
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-UNCL-7161

Implementation

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