9103ffcc by Nitesh

Added incall status in newcall function

1 parent 8c8c5014
...@@ -226,7 +226,7 @@ class DialerController extends Controller ...@@ -226,7 +226,7 @@ class DialerController extends Controller
226 else if ($kstychCall['callnumber'] != "") $users = $wakka->getPersons("mobile='" . $kstychCall['callnumber'] . "' $roclientstr limit 1"); 226 else if ($kstychCall['callnumber'] != "") $users = $wakka->getPersons("mobile='" . $kstychCall['callnumber'] . "' $roclientstr limit 1");
227 else $users = $this->getCallSequencing(1, $client); 227 else $users = $this->getCallSequencing(1, $client);
228 } 228 }
229 229 $wakka->setPersonKey($users[0]['id'], "status", "Incall");
230 $searchresult = '<div style="clear:both"></div><div id=divworking></div><div style="clear:both"></div>'; 230 $searchresult = '<div style="clear:both"></div><div id=divworking></div><div style="clear:both"></div>';
231 if (!empty($users)) { 231 if (!empty($users)) {
232 if (sizeof($users) >= 1) { 232 if (sizeof($users) >= 1) {
...@@ -376,7 +376,7 @@ class DialerController extends Controller ...@@ -376,7 +376,7 @@ class DialerController extends Controller
376 } else { 376 } else {
377 return Response::make($searchresult . "<script>kstychCall['crmid']=0;kSetDData('C','previewcrmid','');simpleNotification('error','topRight','Multiple Records Found!');createSearchRecordDiv('dialersearchbox');</script>"); 377 return Response::make($searchresult . "<script>kstychCall['crmid']=0;kSetDData('C','previewcrmid','');simpleNotification('error','topRight','Multiple Records Found!');createSearchRecordDiv('dialersearchbox');</script>");
378 } 378 }
379 } else return Response::make($searchresult . "<script>kstychCall['crmid']=0;kSetDData('C','previewcrmid','');simpleNotification('error','topRight','No Records Found!');createSearchRecordDiv('dialersearchbox');</script>"); 379 } else return Response::make($searchresult .= "<div id=internalid_matchlist></div><script>createSearchRecordDiv('internalid_matchlist');</script>");
380 } 380 }
381 if ($action == "dialcall") { 381 if ($action == "dialcall") {
382 $sipid = Input::get("sipid"); 382 $sipid = Input::get("sipid");
...@@ -1360,7 +1360,7 @@ class DialerController extends Controller ...@@ -1360,7 +1360,7 @@ class DialerController extends Controller
1360 1360
1361 if ($limit > 0) { 1361 if ($limit > 0) {
1362 1362
1363 $tusers = $wakka->getPersons("status IN ('Called','Incall') and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit"); 1363 $tusers = $wakka->getPersons("status='New' and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit");
1364 foreach ($tusers as $tuser) if (!isset($users[$tuser['id']])) $users[$tuser['id']] = $tuser; 1364 foreach ($tusers as $tuser) if (!isset($users[$tuser['id']])) $users[$tuser['id']] = $tuser;
1365 $limit = $limit - sizeof($tusers); 1365 $limit = $limit - sizeof($tusers);
1366 } 1366 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!