From 3f7a63abdcb48d148dcc7cb9aa9bf606d1762bd8 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 5 May 2017 16:32:42 +0000 Subject: [PATCH] Added Dutch webform 3 buttons, Issue #1012 More fixed for forecasting report git-svn-id: svn://192.168.202.10@2748 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../images/vdc_LB_webform_three_OFF_nl.gif | Bin 0 -> 1303 bytes .../agc/images/vdc_LB_webform_three_nl.gif | Bin 0 -> 1330 bytes .../www/vicidial/AST_inbound_forecasting.php | 74 +++++++++--------- agc_2-X/trunk/www/vicidial/Erlang_report.php | 74 +++++++++--------- 4 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 agc_2-X/trunk/www/agc/images/vdc_LB_webform_three_OFF_nl.gif create mode 100644 agc_2-X/trunk/www/agc/images/vdc_LB_webform_three_nl.gif diff --git a/agc_2-X/trunk/www/agc/images/vdc_LB_webform_three_OFF_nl.gif b/agc_2-X/trunk/www/agc/images/vdc_LB_webform_three_OFF_nl.gif new file mode 100644 index 0000000000000000000000000000000000000000..7809ec7cccf06eab950b0ff59756a0b288faa525 GIT binary patch literal 1303 zcmdVX`#0Nn9LMobF7EW36Na9q5o3g;r=p#cqNN7PvUZuxJfWRpPvC`KpDAE zE|gnvssJW}L?Q_!fg~~+B$J<#!<3K`QmP;oq|!hdNHYu#59{@i-T)aO!_pG8w7Cgw z?(IQ)X0zF1u~@BE@ITM{Efxg;3s6sYoc;vZS%pZ6sI;uSqEcKXxmPW%sgHDF7pa%f}!H;N1bz|fDiOH$yXEU>g ziJ@WlpB5IEmRDBSRtSXk&DD*Uzi#g=&m$WLzaPFb9bRPm5r|CYMgWs)B87#XH3Q5a zuRVekF2t*XeacjjaS(^|iIH=9+Q&V^xT(D3?a5Lcy(s++J!c#tV5yzA7`n(x870x8 zrgfyuHq+*sR;PQvnQLVgd?EK9EwAxw4+4j%+yXSJLXeVOqfI3+hR!BAG_ykrI zfjF}M#aL98M_7KszqAOOG%p3Ci?`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SJv^g3Y~hm!|=h(S?u~s-|D@_k!HrbNePG%q197}0vSphhZA-O zcgbHOn6wl@h4P-!YwP6EtUUq-V9M7rOKB8IDo9PeJ&R310>lC3y`A677{??L^syPJ zGszp>rAUa0^KAkZv8Q7CuEn|gScUgH`=M2SK6W$vF6e!ch7oY0xUVxhpsG97=tSS^ z6WpZF63shVMCJhnHM2Bb_7el)st3!O{?u(On|TZt#?(d!def_?`8U3z$eA zzj?>j^%%brs_|u1`3iCqys{gG`!iE0%XM!4>R<)|uiedG9HS~Ui{oXNI~RYdo==b3 npd00fCJ#N>ANu*o@13DQMW{72aV#=zDQJrSaA~p0) { - $GoS=(pow($total_erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $total_erlangs)); + $GoS=MathZDC((pow($total_erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $total_erlangs))); if ($GoS>$total_blocking) { $ASCII_text.=""; } - $Pqueue=(pow($total_erlangs, $lines)/(factorial($lines)))/((pow($total_erlangs, $lines)/(factorial($lines)))+((1-($total_erlangs/$lines))*erlsum(0, ($lines-1), $total_erlangs))); - $ASA=($Pqueue*$average_call_length)/($lines-$total_erlangs); + $Pqueue=(pow($total_erlangs, $lines)/(factorial($lines)))/((pow($total_erlangs, $lines)/(factorial($lines)))+((1-MathZDC($total_erlangs, $lines))*erlsum(0, ($lines-1), $total_erlangs))); + $ASA=MathZDC(($Pqueue*$average_call_length), ($lines-$total_erlangs)); } else { $lines="N/A"; $Pqueue=0; @@ -878,12 +878,12 @@ else ##### RECOMMENDED AGENTS $lines=1; if ($erlang_type=="B") { - $GoS=(pow($total_erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $total_erlangs)); + $GoS=MathZDC((pow($total_erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $total_erlangs))); if ($GoS>$drop_rate) { $ASCII_text.=""; @@ -981,9 +981,9 @@ else while(list($key, $val)=each($erlang_array)) { if ($val[0]>$bht) {$bht=$val[0];} if ($q%2==0) {$tdclass="records_list_x";} else {$tdclass="records_list_y";} - $average_time=round($val[0]/$val[2]); - $blocking=($val[3]/$val[2]); - $erlangs=($val[2]*$average_time/3600); # Row is call per hour, therefore call length average must be in hours. + $average_time=round(MathZDC($val[0], $val[2])); + $blocking=MathZDC($val[3], $val[2]); + $erlangs=$val[2]*MathZDC($average_time, 3600); # Row is call per hour, therefore call length average must be in hours. $sales=$val[4]+0; $ASCII_text.="| "; #.substr($key, 0, -2)." - ".substr($key, 5, 2)." ".substr($key, 8, 2)." ".substr($key, 0, 4); @@ -1027,12 +1027,12 @@ else ##### RECOMMENDED AGENTS $lines=1; if ($erlang_type=="B") { - $GoS=(pow($erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $erlangs)); + $GoS=MathZDC((pow($erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $erlangs))); if ($GoS>$drop_rate) { $ASCII_text.=""; @@ -1056,20 +1056,20 @@ else ##### ESTIMATED AGENTS $lines=1; if ($blocking>0) { - $GoS=(pow($erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $erlangs)); + $GoS=MathZDC((pow($erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $erlangs))); if ($GoS>$blocking) { $ASCII_text.=""; } - $Pqueue=(pow($erlangs, $lines)/(factorial($lines)))/((pow($erlangs, $lines)/(factorial($lines)))+((1-($erlangs/$lines))*erlsum(0, ($lines-1), $erlangs))); - $ASA=($Pqueue*$average_time)/($lines-$erlangs); + $Pqueue=(pow($erlangs, $lines)/(factorial($lines)))/((pow($erlangs, $lines)/(factorial($lines)))+((1-MathZDC($erlangs, $lines))*erlsum(0, ($lines-1), $erlangs))); + $ASA=MathZDC(($Pqueue*$average_time), ($lines-$erlangs)); } else { $lines="$recommended_agents"; $Pqueue=0; @@ -1114,11 +1114,11 @@ else $ASCII_text.=sprintf("%10s", $lines); $ASCII_text.=" | "; - $ASCII_text.=sprintf("%-10.2f", ($val[2]/$lines)); + $ASCII_text.=sprintf("%-10.2f", MathZDC($val[2], $lines)); # $ASCII_text.=" | "; -# $ASCII_text.=sprintf("%-8s", "\$".number_format(($revenue_per_sale*$sales/$val[2]),2,".",",")); +# $ASCII_text.=sprintf("%-8s", "\$".number_format(MathZDC(($revenue_per_sale*$sales), $val[2]),2,".",",")); # $ASCII_text.=" | "; -# $ASCII_text.=sprintf("%-9s", "\$".number_format(($revenue_per_sale*$sales/$lines),2,".",",")); +# $ASCII_text.=sprintf("%-9s", "\$".number_format(MathZDC(($revenue_per_sale*$sales), $lines),2,".",",")); # $ASCII_text.=" | "; # $ASCII_text.=sprintf("%-10s", "\$".number_format(($revenue_per_sale*$sales),2,".",",")); # $ASCII_text.=" | "; @@ -1131,9 +1131,9 @@ else $CSV_text.="\"$lines\","; - $CSV_text.="\"".sprintf("%.2f", ($val[2]/$lines))."\","; -# $CSV_text.="\"$".number_format(($revenue_per_sale*$sales/$val[2]),2,".",",")."\","; -# $CSV_text.="\"$".number_format(($revenue_per_sale*$sales/$lines),2,".",",")."\","; + $CSV_text.="\"".sprintf("%.2f", MathZDC($val[2], $lines))."\","; +# $CSV_text.="\"$".number_format(MathZDC(($revenue_per_sale*$sales), $val[2]),2,".",",")."\","; +# $CSV_text.="\"$".number_format(MathZDC(($revenue_per_sale*$sales), $lines),2,".",",")."\","; # $CSV_text.="\"$".number_format(($revenue_per_sale*$sales),2,".",",")."\","; # $CSV_text.="\"$".number_format(($lines*$hourly_pay),2,".",",")."\","; # $CSV_text.="\"$".number_format((($revenue_per_sale*$sales)-($lines*$hourly_pay)),2,".",",")."\"\n"; @@ -1141,8 +1141,8 @@ else $graph_stats["$graph_key"][6]=$lines; $graph_stats["$graph_key"][8]=$drop_rate; $graph_stats["$graph_key"][9]=$sales; - $graph_stats["$graph_key"][10]=number_format(($revenue_per_sale*$sales/$val[2]),2,".",""); # Revenue per call - $graph_stats["$graph_key"][11]=number_format(($revenue_per_sale*$sales/$lines),2,".",""); # Revenue per agent + $graph_stats["$graph_key"][10]=number_format(MathZDC(($revenue_per_sale*$sales), $val[2]),2,".",""); # Revenue per call + $graph_stats["$graph_key"][11]=number_format(MathZDC(($revenue_per_sale*$sales), $lines),2,".",""); # Revenue per agent $graph_stats["$graph_key"][12]=number_format(($revenue_per_sale*$sales),2,".",""); # Total revenue $graph_stats["$graph_key"][13]=number_format(($lines*$hourly_pay),2,".",""); # Cost $graph_stats["$graph_key"][14]=number_format((($revenue_per_sale*$sales)-($lines*$hourly_pay)),2,".",","); @@ -1152,8 +1152,8 @@ else $HTML_text2.="$lines\n"; $HTML_text2.="".sprintf("%.2f", ($val[2]/$lines))."\n"; -# $HTML_text2.="\$".number_format(($revenue_per_sale*$sales/$val[2]),2,".",",")."\n"; -# $HTML_text2.="\$".number_format(($revenue_per_sale*$sales/$lines),2,".",",")."\n"; +# $HTML_text2.="\$".number_format(MathZDC(($revenue_per_sale*$sales), $val[2]),2,".",",")."\n"; +# $HTML_text2.="\$".number_format(MathZDC(($revenue_per_sale*$sales), $lines),2,".",",")."\n"; # $HTML_text2.="\$".number_format(($revenue_per_sale*$sales),2,".",",")."\n"; # $HTML_text2.="\$".number_format(($lines*$hourly_pay),2,".",",")."\n"; # $HTML_text2.="\$".number_format((($revenue_per_sale*$sales)-($lines*$hourly_pay)),2,".",",")."\n"; diff --git a/agc_2-X/trunk/www/vicidial/Erlang_report.php b/agc_2-X/trunk/www/vicidial/Erlang_report.php index e6b0a0a5..96091652 100644 --- a/agc_2-X/trunk/www/vicidial/Erlang_report.php +++ b/agc_2-X/trunk/www/vicidial/Erlang_report.php @@ -6,7 +6,7 @@ # CHANGES # # 170428-1205 - First build -# 170504-2115 - Minor bug fixes +# 170504-2245 - Minor bug fixes # $startMS = microtime(); @@ -39,7 +39,7 @@ require("functions.php"); for ($q=0; $q<100; $q++) { $E[($q+1)]=$erlangs+($retry_rate/100)*$E[$q]*$P[$q]; - $P[($q+1)]=(pow($E[($q+1)], $lines)/(factorial($lines)))/(erlsum(0, $lines, $E[($q+1)])); + $P[($q+1)]=MathZDC((pow($E[($q+1)], $lines)/(factorial($lines))), (erlsum(0, $lines, $E[($q+1)]))); } return $P[100]; @@ -392,7 +392,7 @@ $NOW_TIME = date("Y-m-d H:i:s"); $STARTtime = date("U"); if (!isset($group)) {$group = array();} if (!isset($drop_percent)) {$drop_percent = '3';} -if (!isset($campaign)) {$campaign = '';} +if (!isset($campaign)) {$campaign = array();} if (!isset($query_date)) {$query_date = $NOW_DATE;} if (!isset($end_date)) {$end_date = $NOW_DATE;} @@ -719,8 +719,8 @@ else } $uid_clause=""; } - $avg_dispo_sec=$dispo_secs/$wrapup_calls; - $avg_talk_sec=$talk_secs/$wrapup_calls; + $avg_dispo_sec=MathZDC($dispo_secs, $wrapup_calls); + $avg_talk_sec=MathZDC($talk_secs, $wrapup_calls); ##### @@ -754,9 +754,9 @@ else } } $hours_active=count($erlang_array); # Used for giving total erlangs for day, need to divide by number of hours reported, not one hour - $total_erlangs=($erlang_calls*$average_call_length/(3600*$hours_active)); - $total_blocking=($drops_blocks/$erlang_calls); - $sale_percent=($sales/$erlang_calls); + $total_erlangs=MathZDC(($erlang_calls*$average_call_length),(3600*$hours_active)); + $total_blocking=MathZDC($drops_blocks, $erlang_calls); + $sale_percent=MathZDC($sales, $erlang_calls); $rpt_header ="+-----------------+-------+-------+------------+----------+-------------+----------+---------+"; if ($erlang_type=="B") {$rpt_header.="---------+";} @@ -827,12 +827,12 @@ else # ESTIMATED AGENTS $lines=1; if ($total_blocking>0) { - $GoS=(pow($total_erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $total_erlangs)); + $GoS=MathZDC((pow($total_erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $total_erlangs))); if ($GoS>$total_blocking) { $ASCII_text.=""; # if ($retry_rate>0) {$GoS=adjustedGoS($total_erlangs, $GoS, $retry_rate, $lines);} } - $Pqueue=(pow($total_erlangs, $lines)/(factorial($lines)))/((pow($total_erlangs, $lines)/(factorial($lines)))+((1-($total_erlangs/$lines))*erlsum(0, ($lines-1), $total_erlangs))); - $ASA=($Pqueue*$average_call_length)/($lines-$total_erlangs); + $Pqueue=(pow($total_erlangs, $lines)/(factorial($lines)))/((pow($total_erlangs, $lines)/(factorial($lines)))+((1-MathZDC($total_erlangs, $lines))*erlsum(0, ($lines-1), $total_erlangs))); + $ASA=MathZDC(($Pqueue*$average_call_length), ($lines-$total_erlangs)); } else { $lines="N/A"; $Pqueue=0; @@ -885,12 +885,12 @@ else ##### RECOMMENDED AGENTS $lines=1; if ($erlang_type=="B") { - $GoS=(pow($total_erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $total_erlangs)); + $GoS=MathZDC((pow($total_erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $total_erlangs))); if ($GoS>$drop_rate) { $ASCII_text.=""; @@ -971,9 +971,9 @@ else while(list($key, $val)=each($erlang_array)) { if ($val[0]>$bht) {$bht=$val[0];} if ($q%2==0) {$tdclass="records_list_x";} else {$tdclass="records_list_y";} - $average_time=round($val[0]/$val[2]); - $blocking=($val[3]/$val[2]); - $erlangs=($val[2]*$average_time/3600); # Row is call per hour, therefore call length average must be in hours. + $average_time=round(MathZDC($val[0], $val[2])); + $blocking=MathZDC($val[3], $val[2]); + $erlangs=$val[2]*MathZDC($average_time, 3600); # Row is call per hour, therefore call length average must be in hours. $sales=$val[4]+0; $ASCII_text.="| "; #.substr($key, 0, -2)." - ".substr($key, 5, 2)." ".substr($key, 8, 2)." ".substr($key, 0, 4); @@ -1017,12 +1017,12 @@ else ##### RECOMMENDED AGENTS $lines=1; if ($erlang_type=="B") { - $GoS=(pow($erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $erlangs)); + $GoS=MathZDC((pow($erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $erlangs))); if ($GoS>$drop_rate) { $ASCII_text.=""; @@ -1047,12 +1047,12 @@ else ##### ESTIMATED AGENTS $lines=1; if ($blocking>0) { - $GoS=(pow($erlangs, $lines)/(factorial($lines)))/(erlsum(0, $lines, $erlangs)); + $GoS=MathZDC((pow($erlangs, $lines)/(factorial($lines))), (erlsum(0, $lines, $erlangs))); if ($GoS>$blocking) { $ASCII_text.="