VRBL-INV-FR-CIUS-1p0-F1-39

Basic Info

Rule When a Tax Subtotal Category Exemption Reason Code with a value of 'VATEX-FR-CNWVAT' is provided, the value of the Invoice Type Code must be contained in Invoice Type Code (allowed values for Tax Exemption Reason Code VATEX-FR-CNWVAT) [VRBL-CL-FR-InvoiceTypeCode-CNWVAT].
Context /ubl:Invoice
Pattern vrbl-invoice-fr-cius-1p0-ppf-flow1
Severity warning

Used Template: CodeList

Parameter Value
probe = cbc:InvoiceTypeCode
codeList = $VRBL-CL-FR-InvoiceTypeCode-CNWVAT

Implementation

(
	not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReasonCode = 'VATEX-FR-CNWVAT')
)
or
(
	not(boolean(cbc:InvoiceTypeCode))
	or
	(
		(
			not(
				contains(
					normalize-space(cbc:InvoiceTypeCode),
					substring($VRBL-CL-FR-InvoiceTypeCode-CNWVAT, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-FR-InvoiceTypeCode-CNWVAT,
				concat(
					substring($VRBL-CL-FR-InvoiceTypeCode-CNWVAT, 1, 1),
					normalize-space(cbc:InvoiceTypeCode),
					substring($VRBL-CL-FR-InvoiceTypeCode-CNWVAT, 1, 1)
				)
			)
		)
	)
)