From 72e16ead6ee55906587fa381f80dc7b64a9bd943 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 22 Nov 2021 21:15:12 +0000 Subject: [PATCH] Fix for logging bug and modification to drop percentage calculation in AST_VDadapt.pl git-svn-id: svn://192.168.202.10@3542 3d104415-ff17-0410-8863-d5cf3c621b8a --- bin/AST_VDadapt.pl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/AST_VDadapt.pl b/bin/AST_VDadapt.pl index 93ce8f1d..19d6ffc2 100644 --- a/bin/AST_VDadapt.pl +++ b/bin/AST_VDadapt.pl @@ -58,6 +58,7 @@ # 210707-2215 - Fixes for several rare logging and stats issues # 211022-1638 - Added incall_tally_threshold_seconds campaign feature # 212207-2207 - Added IQNANQ to drop SQL calculation queries +# 211122-1457 - Fix for logging bug and modification to drop percentage calculation # $build='212207-2207'; @@ -2883,7 +2884,7 @@ sub calculate_drops while (@aryA = $sthA->fetchrow_array) { $VL_current_hour_date_int = $aryA[0]; - $current_hr=substr($VL_current_hour_date_int, 11, 2); + $current_hr=substr($VCL_current_hour_date_int, 11, 2); $VL_current_hour_calls = $aryA[1]; $VL_next_hour_date_int = $aryA[2]; if ($DBX) {print "VCHC CURRENT HOUR CALLS ANSWERS: |$sthArows|$VL_current_hour_date_int|$VL_current_hour_calls|$stmtA|\n";} @@ -5154,7 +5155,7 @@ sub calculate_drops_inbound while (@aryA = $sthA->fetchrow_array) { $VCL_current_hour_date_int = $aryA[0]; - $current_hr=substr($VL_current_hour_date_int, 11, 2); + $current_hr=substr($VCL_current_hour_date_int, 11, 2); $VCL_current_hour_calls = $aryA[1]; $VCL_next_hour_date_int = $aryA[2]; if ($DBX) {print "VCLHC CURRENT HOUR CALLS DROPS: |$sthArows|$VCL_current_hour_calls|$stmtA|\n";} @@ -5292,8 +5293,15 @@ sub calculate_drops_inbound { $iVCSdrops_today_pct[$p] = ( ($iVCSdrops_today[$p] / $iVCScalls_today[$p]) * 100 ); $iVCSdrops_today_pct[$p] = sprintf("%.2f", $iVCSdrops_today_pct[$p]); - if ($iVCSanswers_today[$p] < 1) {$iVCSanswers_today[$p] = 1;} - $iVCSdrops_answers_today_pct[$p] = ( ($iVCSdrops_today[$p] / $iVCSanswers_today[$p]) * 100 ); + # if ($iVCSanswers_today[$p] < 1) {$iVCSanswers_today[$p] = 1;} + if ($iVCSanswers_today[$p] < 1) + { + $iVCSdrops_answers_today_pct[$p] = 0; + } + else + { + $iVCSdrops_answers_today_pct[$p] = ( ($iVCSdrops_today[$p] / $iVCSanswers_today[$p]) * 100 ); + } $iVCSdrops_answers_today_pct[$p] = sprintf("%.2f", $iVCSdrops_answers_today_pct[$p]); }