VRBL-STM-MX-1p0-10

Basic Info

Rule The value of the Statement Document Currency Code must be contained in MX Currency code subset 1 [VRBL-CL-MX-CurrencyCode-Subset]. Allowed values: MXN.
Context /ubl:Statement/cbc:DocumentCurrencyCode
Pattern vrbl-payments-mx-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-MX-CurrencyCode-Subset
showValues = true

Implementation

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