call track status assigned to history changes

This commit is contained in:
gandhimathi 2018-05-30 18:12:14 +05:30
parent 304050c668
commit a62e1b83ab

View File

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