Worked on correcting minor errors
Showing
2 changed files
with
24 additions
and
5 deletions
| ... | @@ -242,11 +242,29 @@ class ReportController extends Controller | ... | @@ -242,11 +242,29 @@ class ReportController extends Controller |
| 242 | if(!isset($finalArr[$key]['sit_tones'])) $finalArr[$key]['sit_tones']=0; | 242 | if(!isset($finalArr[$key]['sit_tones'])) $finalArr[$key]['sit_tones']=0; |
| 243 | if(!isset($finalArr[$key]['abandoned'])) $finalArr[$key]['abandoned']=0; | 243 | if(!isset($finalArr[$key]['abandoned'])) $finalArr[$key]['abandoned']=0; |
| 244 | 244 | ||
| 245 | $finalArr[$key]['connects_per'] = round(($report['connects'] / $report['dials']) * 100, 2); | 245 | if($report['dials']>0) |
| 246 | $finalArr[$key]['no_answer_per'] = round(($report['no_answer'] / $report['dials']) * 100, 2); | 246 | { |
| 247 | $finalArr[$key]['busy_per'] = round(($report['busy'] / $report['dials']) * 100, 2); | 247 | $finalArr[$key]['connects_per'] = round(($report['connects'] / $report['dials']) * 100, 2); |
| 248 | $finalArr[$key]['abandoned_per'] = round(($report['abandoned'] / $report['connects']) * 100, 2); | 248 | $finalArr[$key]['no_answer_per'] = round(($report['no_answer'] / $report['dials']) * 100, 2); |
| 249 | $finalArr[$key]['sit_tones_per'] = round(($report['sit_tones'] / $report['dials']) * 100, 2); | 249 | $finalArr[$key]['busy_per'] = round(($report['busy'] / $report['dials']) * 100, 2); |
| 250 | $finalArr[$key]['sit_tones_per'] = round(($report['sit_tones'] / $report['dials']) * 100, 2); | ||
| 251 | } | ||
| 252 | else | ||
| 253 | { | ||
| 254 | $finalArr[$key]['connects_per'] = 0; | ||
| 255 | $finalArr[$key]['no_answer_per'] = 0; | ||
| 256 | $finalArr[$key]['busy_per'] = 0; | ||
| 257 | $finalArr[$key]['sit_tones_per'] = 0; | ||
| 258 | } | ||
| 259 | |||
| 260 | if($report['connects']>0) | ||
| 261 | { | ||
| 262 | $finalArr[$key]['abandoned_per'] = round(($report['abandoned'] / $report['connects']) * 100, 2); | ||
| 263 | } | ||
| 264 | else | ||
| 265 | { | ||
| 266 | $finalArr[$key]['abandoned_per'] = 0; | ||
| 267 | } | ||
| 250 | } | 268 | } |
| 251 | 269 | ||
| 252 | $data["reportArr"] = $finalArr; | 270 | $data["reportArr"] = $finalArr; | ... | ... |
| ... | @@ -336,6 +336,7 @@ function dialerAddConfCall() | ... | @@ -336,6 +336,7 @@ function dialerAddConfCall() |
| 336 | function incomingCall(calllog,crmid,numnchn) | 336 | function incomingCall(calllog,crmid,numnchn) |
| 337 | { | 337 | { |
| 338 | incomingbeep.play(); | 338 | incomingbeep.play(); |
| 339 | if(kstychDialer["mDialerSubState"]=="Predictive")$("#dialerstate_btn").parent().attr("disabled",false); | ||
| 339 | 340 | ||
| 340 | //document.getElementById("hangup").play(); | 341 | //document.getElementById("hangup").play(); |
| 341 | $("#dialersearchresults").html('<div id=divworking></div><div style="clear:both"></div>'); | 342 | $("#dialersearchresults").html('<div id=divworking></div><div style="clear:both"></div>'); | ... | ... |
-
Please register or sign in to post a comment