VRBL-INV-SA-1p2-18

Basic Info

Rule The value of the Document Currency Code must be contained in Currency Code (ISO 4217:2005) [VRBL-CL-SA-CurrencyCode].
Context /ubl:Invoice/cbc:DocumentCurrencyCode
Pattern vrbl-invoice-sa-1p2
Severity fatal

Used Template: CodeList

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

Implementation

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