VRBL-INV-PEPPOL-PINT-255

Basic Info

Rule The value of the Allowance Reason Code must be contained in UNCL5189 allowance reason [VRBL-CL-PINT-AllowanceReasonCode]. For more information visit: https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/
Context /ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cbc:AllowanceChargeReasonCode
Pattern vrbl-invoice-peppol-pint
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-PINT-AllowanceReasonCode

Implementation

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