VRBL-INV-CORE-60

Basic Info

Rule The value of the Document 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/cbc:DocumentCurrencyCode
Pattern vrbl-invoice-core
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)
			)
		)
	)
)