VRBL-INV-SG-1p4-15

Basic Info

Rule The Legal Monetary Total in Tax Currency Tax Inclusive Amount and Legal Monetary Total in Tax Currency Tax Exclusive Amount must be provided when Tax Currency Code is provided.
Context /ubl:Invoice/cbc:TaxCurrencyCode
Pattern vrbl-invoice-sg-1p4
Severity fatal

Implementation

(
	not(boolean(/ubl:Invoice/cbc:TaxCurrencyCode))
)
or
(
	boolean(/ubl:Invoice/cac:LegalMonetaryTotal/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:LegalMonetaryTotalExtension/vrbl:LegalMonetaryTotalInTaxCurrency/cbc:TaxInclusiveAmount)
	and
	boolean(/ubl:Invoice/cac:LegalMonetaryTotal/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:LegalMonetaryTotalExtension/vrbl:LegalMonetaryTotalInTaxCurrency/cbc:TaxExclusiveAmount)
)