VRBL-INV-PT-2p1-189
Basic Info
| Rule | The Invoice Line Net Amount must equal the multiplication between the Invoiced Quantity and the Item Net Price divided by the Item Price Base Quantity subtracted by the sum of the Invoice Line Allowances and added the sum of the Invoice Line Charges, 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
|
| Pattern | vrbl-invoice-pt-2p1 |
| Severity | fatal |
Implementation
((not(boolean(cac:Price/cbc:BaseQuantity)) or ((boolean(cac:Price/cbc:BaseQuantity))
and cac:Price/cbc:BaseQuantity = 0 ))
and ((boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false'])
and boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true'])
and ((round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) <= (cbc:LineExtensionAmount + 1.00)
and ((round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) >= (cbc:LineExtensionAmount - 1.00))
or (not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false']))
and boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true'])
and ((round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)) <= (cbc:LineExtensionAmount + 1.00)
and ((round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)) >= (cbc:LineExtensionAmount - 1.00))
or (boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false'])
and not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true']))
and ((round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) <= (cbc:LineExtensionAmount + 1.00)
and ((round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) >= (cbc:LineExtensionAmount - 1.00))
or (not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false']))
and not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true']))
and (round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100) <= (cbc:LineExtensionAmount + 1.00)
and (round(cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount * 100) div 100) >= (cbc:LineExtensionAmount - 1.00))))
or (boolean(cac:Price/cbc:BaseQuantity)
and (cac:Price/cbc:BaseQuantity > 0)
and ((boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false'])
and boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true'])
and ((round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) <= (cbc:LineExtensionAmount + 1.00)
and ((round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) >= (cbc:LineExtensionAmount - 1.00))
or (not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false']))
and boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true'])
and ((round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)) <= (cbc:LineExtensionAmount + 1.00)
and ((round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100)
+ (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='true']/cbc:Amount) * 10 * 10) div 100)) >= (cbc:LineExtensionAmount - 1.00))
or (boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false'])
and not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true']))
and ((round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) <= (cbc:LineExtensionAmount + 1.00)
and ((round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100)
- (round(sum(cac:AllowanceCharge[cbc:ChargeIndicator='false']/cbc:Amount) * 10 * 10) div 100)) >= (cbc:LineExtensionAmount - 1.00))
or (not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='false']))
and not(boolean(cac:AllowanceCharge[cbc:ChargeIndicator='true']))
and (round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100) <= (cbc:LineExtensionAmount + 1.00)
and (round((cbc:InvoicedQuantity * cac:Price/cbc:PriceAmount div cac:Price/cbc:BaseQuantity) * 100) div 100) >= (cbc:LineExtensionAmount - 1.00))))