VRBL-INV-PEPPOL-RCM-96

Basic Info

Rule The value of the Invoice Tax Subtotal Amount Currency ID must be contained in Alpha-3 currency [VRBL-CL-PEPPOL-CurrencyCode].
Context /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID = ../cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount
Pattern vrbl-invoice-peppol-bis3p0-reduced-codesmodel
Severity fatal

Used Template: CodeList

Parameter Value
probe = @currencyID
codeList = $VRBL-CL-PEPPOL-CurrencyCode

Implementation

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