VRBL-INV-CH-YELLOWBILL-3p0-7

Basic Info

Rule The value of the Additional Party Code must be contained in Additional Party Code (subset of UNCL3035) [VRBL-CL-CH-AdditionalPartyCode-UNCL3035].
Context /ubl:Invoice/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:AdditionalParty
Pattern vrbl-ch-yellowbill-3p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = @code
codeList = $VRBL-CL-CH-AdditionalPartyCode-UNCL3035

Implementation

not(boolean(@code))
or
(
	(
		not(
			contains(
				normalize-space(@code),
				substring($VRBL-CL-CH-AdditionalPartyCode-UNCL3035, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-CH-AdditionalPartyCode-UNCL3035,
			concat(
				substring($VRBL-CL-CH-AdditionalPartyCode-UNCL3035, 1, 1),
				normalize-space(@code),
				substring($VRBL-CL-CH-AdditionalPartyCode-UNCL3035, 1, 1)
			)
		)
	)
)