VRBL-INV-AE-1p0-98

Basic Info

Rule When the Tax Currency Code is 'AED' and the Document Currency Code is not 'AED', the Tax Exchange Rate MUST be provided where the Tax Exchange Rate Source Currency Code matches the Document Currency Code, the Tax Exchange Rate Target Currency Code matches the Tax Currency Code, and the Tax Exchange Rate Calculation Rate is present.
Context /ubl:Invoice
Pattern vrbl-invoice-AE-1p0
Severity fatal

Implementation

not(cbc:TaxCurrencyCode = 'AED' and cbc:DocumentCurrencyCode != 'AED')
or
(
	cac:TaxExchangeRate/cbc:SourceCurrencyCode = cbc:DocumentCurrencyCode
	and cac:TaxExchangeRate/cbc:TargetCurrencyCode = cbc:TaxCurrencyCode
	and cac:TaxExchangeRate/cbc:CalculationRate
)