diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index ca2b9a5f..c7abf64c 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -591,24 +591,69 @@ class Studentview_model extends CI_Model { // echo 'in'; - $this->db->select('T_ApplicationStatus.StudentID,AppDate,CertificateName,ListName,Firstname,Lastname,T_ApplicationStatus.Comments,CourseName,T_ApplicationStatus.CertificationNo'); - $this->db->from('T_ApplicationStatus'); - $this->db->join('T_PickListDetails','T_PickListDetails.ListCode = T_ApplicationStatus.ListCode','left'); - $this->db->join('T_CertificationMaster','T_CertificationMaster.CertificationID = T_ApplicationStatus.CertificationType','left'); - $this->db->join('T_StudentDetails','T_StudentDetails.StudentID = T_ApplicationStatus.StudentID','left'); - $this->db->join('T_CourseMaster','T_CourseMaster.CourseID = T_ApplicationStatus.CourseID','left'); - $this->db->where('T_ApplicationStatus.CourseID',$courseid); - $this->db->where('T_ApplicationStatus.StudentID',$studentid); - $this->db->group_by('CertificationType'); - $this->db->order_by('T_ApplicationStatus.CreatedOn','desc'); + // $this->db->select('T_ApplicationStatus.StudentID,AppDate,CertificateName,ListName,Firstname,Lastname,T_ApplicationStatus.Comments,CourseName,T_ApplicationStatus.CertificationNo'); + // $this->db->from('T_ApplicationStatus'); + // $this->db->join('T_PickListDetails','T_PickListDetails.ListCode = T_ApplicationStatus.ListCode','left'); + // $this->db->join('T_CertificationMaster','T_CertificationMaster.CertificationID = T_ApplicationStatus.CertificationType','left'); + // $this->db->join('T_StudentDetails','T_StudentDetails.StudentID = T_ApplicationStatus.StudentID','left'); + // $this->db->join('T_CourseMaster','T_CourseMaster.CourseID = T_ApplicationStatus.CourseID','left'); + // $this->db->where('T_ApplicationStatus.CourseID',$courseid); + // $this->db->where('T_ApplicationStatus.StudentID',$studentid); + // $this->db->group_by('CertificationType'); + // $this->db->order_by('T_ApplicationStatus.CreatedOn','desc'); - $appDetails = $this->db->get(); + // $appDetails = $this->db->get(); - if ($appDetails->result()){ - return $appDetails->result(); - } - else{ + // if ($appDetails->result()){ + // return $appDetails->result(); + // } + // else{ + // return false; + // } + + + + $this->db->select('max(t1.CreatedOn) as maxdate'); + $this->db->from('T_ApplicationFormStatus as t1'); + $this->db->join('T_Registration_Details as t2', 't2.ID = t1.Registration_Details_ID'); + $this->db->where('t2.StudentID',$studentid); + $this->db->where('t2.CourseID', $courseid); + + $dateres=$this->db->get(); + + $dateval = $dateres->result(); + + $madate =''; + + foreach($dateval as $va) + { + $madate = $va->maxdate; + } + + // echo $madate; + // die(); + + + $this->db->select('t1.ID, t2.BatchCode, t2.FeeType as SemID, CFD.Sem_Year as Sem_Year, t2.RegistrationMode, t2.RegistrationType, t1.AppFormDate as StatusUpdateDate,t3.ListName ,t1.Comments'); + $this->db->from('T_ApplicationFormStatus as t1'); + $this->db->join('T_Registration_Details as t2', 't2.ID = t1.Registration_Details_ID'); + $this->db->join('T_Course_Fees_Details as CFD', 'CFD.ID = t2.FeeType'); + $this->db->join('' . PICK_LIST_DETAILS . ' as t3', 't3.ListCode = t1.ListCode', 'LEFT'); + + $this->db->where('t2.StudentID', $studentid); + $this->db->where('t2.CourseID', $courseid); + $this->db->where('t1.CreatedOn',$madate); + $fromTypes = $this->db->get(); + $formTypeDetails = $fromTypes->result(); + if($formTypeDetails) + { + return $fromTypes->result(); + } + else + { + // print_r($formTypeDetails);exit(); return false; + } } diff --git a/Apollo/assets/views/student/studentDetailsModal.html b/Apollo/assets/views/student/studentDetailsModal.html index a9795e9a..99781e41 100755 --- a/Apollo/assets/views/student/studentDetailsModal.html +++ b/Apollo/assets/views/student/studentDetailsModal.html @@ -304,7 +304,7 @@ - +
@@ -321,13 +321,12 @@ Date Comments --> - Certificate Number - Certificate Type - Course + Status Comments + Batch Date - Status - + SEM/YEAR + Form Type @@ -346,12 +345,12 @@ --> - {{apps.CertificationNo}} - {{apps.CertificateName}} - {{apps.CourseName}} - {{apps.Comments}} - {{apps.AppDate}} - {{apps.ListName}} + {{apps.ListName}} + {{apps.Comments}} + {{apps.BatchCode}} + {{apps.StatusUpdateDate}} + {{apps.Sem_Year}} + {{apps.RegistrationType}}