course details changes done

This commit is contained in:
gandhimathi 2018-02-14 13:22:02 +05:30
parent c95968eb93
commit 5a87d20b5d

View File

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