From 8e1ca8167375f8c4b8a55b1e4b91806166a1d549 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 25 Apr 2018 12:36:40 +0530 Subject: [PATCH] call track changes in student model --- Apollo/api/application/models/Student_model.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index ddfcd8eb..5413e658 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -1269,15 +1269,17 @@ class Student_model extends CI_Model $this->db->where('PLD.ListName','PENDING'); $this->db->where('AC.IsActive','1'); $this->db->where('AS.IsActive','1'); + $this->db->where('AC.BranchCode',$localdata['localBranchID']); + $this->db->where('PLD.BranchCode',$localdata['localBranchID']); $checkApplicationStatus=$this->db->get()->last_row(); if($checkApplicationStatus){ - $studentDetails = $this->studentInfoForDocumentStatus($fromDetails); + $studentDetails = $this->studentInfoForDocumentStatus($fromDetails,$localdata); if($studentDetails){ $arrayDetails['MobileNumber']=$studentDetails->MobileNumber; $arrayDetails['LeadName']=$studentDetails->Firstname; - $arrayDetails['University']=""; - $arrayDetails['Course']=""; + $arrayDetails['University']=$studentDetails->UniversityName;; + $arrayDetails['Course']=$studentDetails->CourseName;; $arrayDetails['ActivityStatus'] = $checkApplicationStatus->ActivityID;; $arrayDetails['StatusCode']=$checkApplicationStatus->ListCode; $arrayDetails['CreatedBranch']=$localdata['localBranchID']; @@ -1358,7 +1360,7 @@ class Student_model extends CI_Model * get student info for documet updates * created by kms * */ - public function studentInfoForDocumentStatus($details=null){ + public function studentInfoForDocumentStatus($details=null,$localdata=null){ $this->db->select('ST.Firstname,ST.MobileNumber,US.UniversityName,CU.CourseName'); $this->db->from(STUDENTCOURSE.' as STC'); @@ -1366,8 +1368,10 @@ class Student_model extends CI_Model $this->db->join(COURSE.' as CU', 'CU.CourseID = STC.CourseID'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID'); $this->db->where('ST.StudentID',$details['StudentID']); + $this->db->where('US.BranchCode',$localdata['localBranchID']); // $this->db->where('STC.CourseID',$details[0]['CourseID']); $leadDet=$this->db->get()->last_row(); + if($leadDet){ return $leadDet; }