From a62e1b83abaf33af2c031193866f344fb458c5d4 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 30 May 2018 18:12:14 +0530 Subject: [PATCH] call track status assigned to history changes --- Apollo/api/application/models/Calltracking_model.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index bd20bdda..6bedbb31 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -541,11 +541,13 @@ class Calltracking_model extends CI_Model { public function getTrackingFollowup($trackingId=null) { - $this->db->select('LTF.InteractionId,LTF.TrackingID,LTF.FollowupOn,LTF.FollowupComments,DATE_FORMAT(LTF.CreatedOn, "%d-%m-%Y %h:%i %p") AS CreatedOn,ST.FirstName'); - + $this->db->select('LTF.InteractionId,LTF.TrackingID,LTF.FollowupOn,LTF.FollowupComments,DATE_FORMAT(LTF.CreatedOn, "%d-%m-%Y %h:%i %p") AS CreatedOn,ST.FirstName,ST1.FirstName as AssignedName,PLD.ListName as AssignedStatus'); $this->db->from(LEAD_TRACKING_FOLLOWUP.' as LTF'); $this->db->join(LOGIN.' as LO', 'LO.ID = LTF.CreatedBy'); $this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID'); + $this->db->join(LOGIN.' as LO1', 'LO1.ID = LTF.AssignedStaff','left'); + $this->db->join(STAFF.' as ST1', 'ST1.StaffID = LO1.StaffID','left'); + $this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = LTF.StatusName','left'); $this->db->where('TrackingID',$trackingId); $this->db->order_by('InteractionId','DESC'); $trackingDetails = $this->db->get();