VRBL-INV-PEPPOL-PINT-258

Basic Info

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

Used Template: CodeList

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

Implementation

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