VRBL-INV-RS-1p0-15

Basic Info

Rule When the Seller is Serbian, and the Invoiced Item Tax Scheme Code is "VAT", then the Invoiced Item Tax Category Code must be one of the following values: S, AE, Z, E, R, O, OE, SS, N.
Context /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory
Pattern vrbl-invoice-rs-1p0
Severity fatal

Implementation

not(
	$RSSupplierCountry = 'RS'
	and
	translate(normalize-space(cac:TaxScheme/cbc:ID), 'vat', 'VAT') = 'VAT'
)
or
(
	not(
		contains(
			normalize-space(cbc:ID),
			substring($VRBL-CL-Modified-TaxCategory, 1, 1)
		)
	)
	and
	contains(
		$VRBL-CL-Modified-TaxCategory,
		concat(
			substring($VRBL-CL-Modified-TaxCategory, 1, 1),
			normalize-space(cbc:ID),
			substring($VRBL-CL-Modified-TaxCategory, 1, 1)
		)
	)
)