TB - totalConsumptionTol.xml
Checks that the total consumption on this bill is within a specified percentage of the previous issued bill.
Validator Set Up
Variables
Variable | Description |
---|---|
Bill will pass validation if the Query Value is less than (£) | Enter a monitory figure, for example 10. The Validator will only fail if the value of the difference is above £10 (the above example is 0, therefore it will always fail if the tolerance is exceeded). |
Tolerance value (%) | Enter a percentage figure that you want the value to be within, for example enter 20 (for 20%) |
Current Bill details
Previous Bill details
Failure Prompt
Explanation:
Total consumption within % of previous bill: FAILED - name of the validator
tolerance=20.00 - the tolerance set in the validator
upperLimit=71149.20 - the amount of the consumption in the previous bill, plus 20%. 59291 (previous bills consumption) + 11858.20 (20%) = 71149.20 (upper limit)
totalConsumption=98999.00 - the total consumption in the current bill
lowerLimit=47432.80 - the amount of the consumption in the previous bill, minus 02%. 59291 (previous bills consumption) - 11858.20 (20%) = 47432.80 (upper limit)
MinimumQueryValue=0.00 - the minimum value set in the validator
QueryValue=5956.20 - the monetary amount of the query. £14849.85 (current billed cost) - £8893.65 (previous billed cost) = £5956.20 (the difference between the two)