VRBL-INV-AE-1p0-151

Basic Info

Rule When the Period Description Code is used for frequency of billing, the value of the Period Description Code must be contained in Frequency of billing codes (official AE-FreqBill) [VRBL-CL-AE-FreqBill]. For more information visit: https://docs.peppol.eu/poac/ae/pint-ae/trn-invoice/codelist/FreqBilling/
Context /ubl:Invoice/cac:InvoicePeriod/cbc:DescriptionCode
Pattern vrbl-invoice-AE-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-AE-FreqBill

Implementation

(
	not(normalize-space(@listID) = concat($VRBL-AE-Prefix, 'FreqBill'))
)
or
(
	not(boolean(.))
	or
	(
		(
			not(
				contains(
					normalize-space(.),
					substring($VRBL-CL-AE-FreqBill, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-AE-FreqBill,
				concat(
					substring($VRBL-CL-AE-FreqBill, 1, 1),
					normalize-space(.),
					substring($VRBL-CL-AE-FreqBill, 1, 1)
				)
			)
		)
	)
)