From 4d5655c6241919b27d83a0e7d19f6da30d4fa3f7 Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Mon, 11 Nov 2019 22:37:50 +0100 Subject: [PATCH] TT#70320 fix fraud_limit_exceeded calculation Change-Id: I175c0bcc9c71c8add42f92be678ae638b6e6bd61 --- rate-o-mat.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rate-o-mat.pl b/rate-o-mat.pl index 9e2ac99..7a939a8 100755 --- a/rate-o-mat.pl +++ b/rate-o-mat.pl @@ -634,8 +634,8 @@ EOS " ?," . #_reseller_cost," . " 1," . " if(? > 0," . #_fraud_use_reseller_rates - " if(? >= ?,1,0)," . #_reseller_cost _fraud_interval_limit - " if(? >= ?,1,0))," . #_customer_cost _fraud_interval_limit + " if(? + 0.0 >= ? + 0.0,1,0)," . #_reseller_cost _fraud_interval_limit + " if(? + 0.0 >= ? + 0.0,1,0))," . #_customer_cost _fraud_interval_limit " ?," . #_fraud_limit_type," . " ?," . #_cdr_start_time," . " ?," . #_cdr_id," . @@ -648,19 +648,19 @@ EOS " reseller_cost = reseller_cost + ?," . #_reseller_cost," . " cdr_count = cdr_count + 1," . " fraud_limit_exceeded = if(? > 0," . #_fraud_use_reseller_rates - " if(reseller_cost + ? >= ?,1,0)," . #_reseller_cost _fraud_interval_limit - " if(customer_cost + ? >= ?,1,0))," . #_customer_cost _fraud_interval_limit + " if(reseller_cost + ? >= ? + 0.0,1,0)," . #_reseller_cost _fraud_interval_limit + " if(customer_cost + ? >= ? + 0.0,1,0))," . #_customer_cost _fraud_interval_limit " fraud_limit_type = ?," . #_fraud_limit_type - " first_cdr_start_time = if(? < first_cdr_start_time," . #_cdr_start_time + " first_cdr_start_time = if(? + 0.0 < first_cdr_start_time," . #_cdr_start_time " ?," . #_cdr_start_time " first_cdr_start_time)," . - " first_cdr_id = if(? < first_cdr_id," . #_cdr_id + " first_cdr_id = if(? + 0 < first_cdr_id," . #_cdr_id " ?," . #_cdr_id " first_cdr_id)," . - " last_cdr_start_time = if(? > last_cdr_start_time," . #_cdr_start_time + " last_cdr_start_time = if(? + 0.0 > last_cdr_start_time," . #_cdr_start_time " ?," . #_cdr_start_time " last_cdr_start_time)," . - " last_cdr_id = if(? > last_cdr_id," . #_cdr_id + " last_cdr_id = if(? + 0 > last_cdr_id," . #_cdr_id " ?," . #_cdr_id " last_cdr_id)";