From 5a87d20b5de0bbae9c54d67060c50f168a7064c2 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Feb 2018 13:22:02 +0530 Subject: [PATCH] course details changes done --- Apollo/api/application/models/Calltracking_model.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index db94fe5f..57424352 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -208,7 +208,9 @@ class Calltracking_model extends CI_Model { $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->join(BRANCH.' as BR', 'BR.BranchCode = STB.BranchCode'); $this->db->where('ST.IsActive',$status); + $this->db->where('BR.IsActive',$status); if($userType== ADMIN){ $this->db->where('STB.BranchCode',$branchID); $this->db->where('LO.ListCode !=',SUPER_ADMIN); @@ -235,7 +237,7 @@ class Calltracking_model extends CI_Model { else{ $this->db->select('BR.BranchCode,BR.BranchName'); $this->db->from(BRANCH.' as BR'); - //$this->db->where('BR.IsActive',$status); + $this->db->where('BR.IsActive',$status); $branchDetails=$this->db->get(); if($branchDetails->result()){ @@ -584,13 +586,15 @@ class Calltracking_model extends CI_Model { public function getLoadFollowupDetails($trackingID) { - $this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.CreatedBranch,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName'); + $this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.CreatedBranch,BR.BranchName,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName'); $this->db->from(LEAD_DETAILS.' as LD'); $this->db->join(LEAD_TRACKING.' as LT', 'LT.LeadID = LD.LeadID'); $this->db->join(LOGIN.' as LO', 'LO.ID = LT.AssignedTo'); $this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID'); $this->db->join(ACTIVITY.' as AV', 'AV.ActivityID = LT.ActivityStatus'); $this->db->join(PICK_LIST_DETAILS.' as PLD1', 'PLD1.ListCode = LT.StatusCode'); + $this->db->join(BRANCH.' as BR', 'BR.BranchCode = LT.CreatedBranch'); + $this->db->where('LT.TrackingID',$trackingID['TrackingID']); if($trackingID['CreatedBranch'] !='All' AND $trackingID['requestedDept'] != EMPLOYEE){ $this->db->where('LT.CreatedBranch', $trackingID['CreatedBranch']); @@ -620,7 +624,9 @@ class Calltracking_model extends CI_Model { $tracking_array["ActivityStatus"]=$row->ActivityStatus; $tracking_array["AssignedTo"]=$row->AssignedTo; $tracking_array["CreatedBranch"]=$row->CreatedBranch; + $tracking_array["CreatedBranchName"]=$row->BranchName; $tracking_array["Firstname"]=$row->Firstname; + $tracking_array["StaffID"]=$row->StaffID; $tracking_array["StatusCode"]=$row->StatusCode; $tracking_array["statusName"]=$row->statusListName; $tracking_array["UniversityName"]=$row->University;