VRBL-INV-AU-1p0-9

Basic Info

Rule The value of the Invoice Period Description Code must be contained in Description [VRBL-CL-AU-DescriptionCode]. Allowed values: 3, 35, 432.
Context /ubl:Invoice/cac:InvoicePeriod/cbc:DescriptionCode
Pattern vrbl-invoice-au-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-AU-DescriptionCode
showValues = true

Implementation

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