VRBL-INV-IN-1p0-68

Basic Info

Rule If the Document Level Allowances is used with Allowance Charge After Tax Indicator set to 'true', the Legal Monetary Total Allowance Total Amount After Tax must exist.
Context /ubl:Invoice/cac:LegalMonetaryTotal/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:LegalMonetaryTotalExtension
Pattern vrbl-invoice-in-1p0
Severity fatal

Implementation

not(boolean(/ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false' and cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:AllowanceChargeExtension/vrbl:AfterTaxIndicator='true']))
or
boolean(vrbl:AllowanceTotalAmountAfterTax)