diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index e263585f..82ecc855 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -665,6 +665,11 @@ class Calltracking_model extends CI_Model { if($search['BranchID'] !='All'){ $this->db->where('LT.CreatedBranch', $search['BranchID']); + } + if ($search['requestedDept'] == EMPLOYEE){ + + $this->db->where('LT.AssignedTo', $search['requestedBy']); + } $this->db->where('LTF.FollowupOn',$todayDate); $trackDetails=$this->db->get(); @@ -711,6 +716,11 @@ class Calltracking_model extends CI_Model { if($search['BranchID'] !='All'){ $this->db->where('LT.CreatedBranch', $search['BranchID']); + } + if ($search['requestedDept'] == EMPLOYEE){ + + $this->db->where('LT.AssignedTo', $search['requestedBy']); + } $this->db->like('LD.CreatedOn', $todayDate, 'after'); $trackDetails=$this->db->get(); @@ -758,6 +768,11 @@ class Calltracking_model extends CI_Model { if($search['BranchID'] !='All'){ $this->db->where('LT.CreatedBranch', $search['BranchID']); + } + if ($search['requestedDept'] == EMPLOYEE){ + + $this->db->where('LT.AssignedTo', $search['requestedBy']); + } $trackDetails=$this->db->get();