VRBL-INV-PT-2p1-239

Basic Info

Rule The Item Net Price must equal the Item Gross Price minus the Item Price Discount, with an acceptance range of 1.00 EURO (it does not mean that this tolerance is accepted by the customer).
Context /ubl:Invoice/cac:InvoiceLine/cac:Price
Pattern vrbl-invoice-pt-2p1
Severity fatal

Implementation

(not(boolean(cac:AllowanceCharge/cbc:BaseAmount)) and not(boolean(cac:AllowanceCharge/cbc:Amount))) 
			or ((cac:AllowanceCharge/cbc:BaseAmount - (cac:AllowanceCharge/cbc:Amount)) <= (cbc:PriceAmount + 1.00) 
			and (cac:AllowanceCharge/cbc:BaseAmount - (cac:AllowanceCharge/cbc:Amount))  >= (cbc:PriceAmount - 1.00))