This commit is contained in:
resicovenba 2018-01-25 12:13:29 +05:30
commit 2a0c2478b7

View File

@ -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();