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