From 35de43a45d6356497f78f391a4ed2ef50034adea Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 25 Jan 2018 11:48:38 +0530 Subject: [PATCH] course details changes done --- Apollo/api/application/models/Calltracking_model.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index 9432b0dc..d18019d3 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -181,13 +181,15 @@ class Calltracking_model extends CI_Model { $this->db->select('LO.ID,ST.StaffID,ST.Firstname'); $this->db->from(LOGIN.' as LO'); + $this->db->join(STAFF_BRANCH.' as STB', 'STB.StaffID = LO.StaffID'); $this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID'); $this->db->where('ST.IsActive',$status); if($userType== ADMIN){ - $this->db->where('ST.BranchCode',$branchID); + $this->db->where('STB.BranchCode',$branchID); $this->db->where('LO.ListCode !=',SUPER_ADMIN); } if($userType== EMPLOYEE){ + $this->db->where('STB.BranchCode',$branchID); $this->db->where('LO.ID',$requestedBy); } $staffDetails=$this->db->get(); @@ -238,10 +240,10 @@ class Calltracking_model extends CI_Model { $this->db->select('LO.ID,ST.StaffID,ST.Firstname'); $this->db->from(LOGIN.' as LO'); + $this->db->join(STAFF_BRANCH.' as STB', 'STB.StaffID = LO.StaffID'); $this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID'); $this->db->where('ST.IsActive',$status); - - $this->db->where('ST.BranchCode',$branchID); + $this->db->where('STB.BranchCode',$branchID); $staffDetails=$this->db->get(); if($staffDetails){ $result_staff = array();