VRBL-INV-FR-CIUS-1p0-289

Basic Info

Rule At least one Tax Breakdown marked as Not subject to VAT is required when Document Level Allowances, Document Level Charges or Invoice Line is marked as Not subject to VAT.
Context /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID = ../cbc:DocumentCurrencyCode]
Pattern vrbl-invoice-fr-cius-1p0-min
Severity fatal

Used Template: VRBL-FR-TaxSubtotal-count

Parameter Value
taxTypeCode = O
taxTypeName = Not subject to VAT

Implementation

not(
	boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cac:TaxCategory[cbc:ID = 'O'][cac:TaxScheme/cbc:ID = 'VAT'])
	or
	boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cac:TaxCategory[cbc:ID = 'O'][cac:TaxScheme/cbc:ID = 'VAT'])
	or
	boolean(../cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[cbc:ID = 'O'][cac:TaxScheme/cbc:ID = 'VAT'])
)
or
(
	count(cac:TaxSubtotal[cac:TaxCategory/cbc:ID = 'O' and cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']) >= 1
	and
	(
		boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cac:TaxCategory[cbc:ID = 'O'][cac:TaxScheme/cbc:ID = 'VAT'])
		or
		boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cac:TaxCategory[cbc:ID = 'O'][cac:TaxScheme/cbc:ID = 'VAT'])
		or
		boolean(../cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[cbc:ID = 'O'][cac:TaxScheme/cbc:ID = 'VAT'])
	)
)