VRBL-INV-PT-2p1-12

Basic Info

Rule Sum Allowance Amount = Sum Legal Monetary Total Allowance Total Amount, with an acceptance range of 1.00 EURO (it does not mean that this tolerance is accepted by the customer).
Context /ubl:Invoice
Pattern vrbl-invoice-pt-2p1
Severity fatal

Implementation

(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false']) 
			and (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100) <= (cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount + 1.00) 
			and (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100) >= (cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount - 1.00)) 
			or (not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false'])) and cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount = 0.00) 
			or not(cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount)