From 367b8d6b313ed557e56da15aa2f105dbfe693199 Mon Sep 17 00:00:00 2001 From: sriramv Date: Wed, 30 Jan 2019 15:29:55 +0530 Subject: [PATCH] 1596 AdmittedBy and Date --- Apollo/api/application/config/constants.php | 3 ++ .../application/models/Studentview_model.php | 23 +++++++++++--- .../views/student/studentDetailsModal.html | 31 +++++++++++-------- Apollo/assets/views/student/studentView.html | 6 ++-- 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 5be79ed6..8a754166 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -165,6 +165,8 @@ defined('FORMFEESRECEIVEDFROMUNIV') OR define('FORMFEESRECEIVEDFROMUNIV','T_Form defined('UNIVERSITYCREDITDEBIY') OR define('UNIVERSITYCREDITDEBIY','T_University_Credit_Debit'); defined('UNIVERSITYPAYMENT') OR define('UNIVERSITYPAYMENT','T_University_Payment'); +defined('ADMISSIONS') OR define('ADMISSIONS','admissions'); + // define APPLICATION certificate type constant defined('APPLICATION_CONST') OR define('APPLICATION_CONST','APPLICATION'); @@ -190,3 +192,4 @@ defined('NONOPERATIONAL') OR define('NONOPERATIONAL','T_NonOperationalMaster'); + diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index aac174d4..f0a8d974 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -65,10 +65,13 @@ class Studentview_model extends CI_Model } else if ($requestFrom =='3'){ // echo '3'; - $this->db->select('ST.*'); + $this->db->select('ST.*,min(BillDate)'); $this->db->from( LOGIN . ' as LO'); $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); + $this->db->join(STUDENTS_FEES_PAID . ' as SFP','SFP.StudentID = ST.StudentID '); + + $this->db->join(STUDENTS_FEES_STATUS . ' as SFS','SFS.FeesID = SFP.FeesId and SFS.StudentID = SFP.StudentID'); $this->db->where('ST.MobileNumber', $requestedBy); $this->db->where('STC.BranchID', $requestedBranch); $studentDetails = $this->db->get()->first_row(); @@ -110,11 +113,12 @@ class Studentview_model extends CI_Model public function getStudentCourseStudentLogin($studentId=null,$requestFrom=null,$requestedBranch=null,$accessFrom=null){ // this sub query for avoid university duplicate id - $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName'); + $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName,AD.CreatedOn,AD.AdmittedBy'); $this->db->from( STUDENTCOURSE . ' as SCU'); $this->db->join( BRANCH . ' as BR', 'BR.BranchCode = SCU.BranchID'); $this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID'); $this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode'); + $this->db->join( ADMISSIONS .' as AD','AD.StudentID = SCU.StudentID and AD.UniversityID = SCU.UniversityID','LEFT'); $this->db->where('SCU.StudentID',$studentId); if($accessFrom == 'Web'){ $this->db->where('BR.Is_StudentWebAccessActive', 1); @@ -130,6 +134,8 @@ class Studentview_model extends CI_Model $fetchData['UniversityID']=$row->UniversityID; $fetchData['UniversityName']=$row->UniversityName; $fetchData['UniveShortName'] = $row->UniversityShortName; + $fetchData['CreatedOn']=$row->CreatedOn; + $fetchData['AdmittedBy']=$row->AdmittedBy; // $fetchData['SessionName']=$row->SessionName; $fetchData['EnrollmentID']=$row->EnrollmentID; // get student fees details @@ -169,12 +175,19 @@ class Studentview_model extends CI_Model $this->db->where('StudentID',$studentId); $subQuery = $this->db->get_compiled_select();*/ // subquery end - $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName'); + $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName,AD.CreatedOn,AD.AdmittedBy'); $this->db->from( STUDENTCOURSE . ' as SCU'); $this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID'); $this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode'); + $this->db->join( ADMISSIONS .' as AD','AD.StudentID = SCU.StudentID and AD.UniversityID = SCU.UniversityID','LEFT'); + // $this->db->join(STUDENTS_FEES_PAID . ' as SFP','SFP.StudentID = SCU.StudentID '); + + // $this->db->join(STUDENTS_FEES_STATUS . ' as SFS','SFS.FeesID = SFP.FeesId and SFS.StudentID = SFP.StudentID'); // $this->db->join( SESSIONMASTER . ' as SM', 'SM.SessionID = SCU.SessionID'); $this->db->where('SCU.StudentID',$studentId); + + + //print_r($this->db->last_query());die(); if($requestFrom!='2'){ $this->db->where('CU.BranchCode',$requestedBranch); } @@ -188,7 +201,8 @@ class Studentview_model extends CI_Model $fetchData['UniversityID']=$row->UniversityID; $fetchData['UniversityName']=$row->UniversityName; $fetchData['UniveShortName'] = $row->UniversityShortName; - // $fetchData['SessionName']=$row->SessionName; + $fetchData['CreatedOn']=$row->CreatedOn; + $fetchData['AdmittedBy']=$row->AdmittedBy; $fetchData['EnrollmentID']=$row->EnrollmentID; // get student fees details $fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID); @@ -217,6 +231,7 @@ class Studentview_model extends CI_Model else{ $studentCourseStatus['status'] = false; } + //print_r($this->db->last_query());die(); return $studentCourseStatus; } diff --git a/Apollo/assets/views/student/studentDetailsModal.html b/Apollo/assets/views/student/studentDetailsModal.html index fd1cb4bc..2be174e7 100755 --- a/Apollo/assets/views/student/studentDetailsModal.html +++ b/Apollo/assets/views/student/studentDetailsModal.html @@ -102,14 +102,14 @@ {{items.studentDetails.PermanentAddress}} - - Admitted BY - {{items.studentDetails.fname}} - - - Admission Date - {{items.studentDetails.DOJ}} - + + + + + + + + @@ -212,22 +212,27 @@ -
+ - diff --git a/Apollo/assets/views/student/studentView.html b/Apollo/assets/views/student/studentView.html index b44b1940..91ca2259 100755 --- a/Apollo/assets/views/student/studentView.html +++ b/Apollo/assets/views/student/studentView.html @@ -172,8 +172,8 @@ {{studentDetails.Designation}} - Admission Date - {{studentDetails.DOJ}} + + @@ -238,7 +238,7 @@
- {{course.UniversityName}}  :  Enrollment ID  : {{course.EnrollmentID}} + {{course.UniversityName}}          Enrollment ID  :     {{course.EnrollmentID}}           Date Of Joining  :  {{course.CreatedOn}}