VRBL-INV-MY-1p0-125

Basic Info

Rule The value of the Tax Exchange Rate Target Currency Code must be contained in ISO 4217 Alpha-3 currency [VRBL-CL-CurrencyCode]. For more information visit: https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
Context /ubl:Invoice/cac:TaxExchangeRate/cbc:TargetCurrencyCode
Pattern vrbl-invoice-my-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-CurrencyCode

Implementation

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