course details changes done

This commit is contained in:
gandhimathi 2018-03-06 19:58:15 +05:30
parent bd86da9ebb
commit e8b49be4d1

View File

@ -79,11 +79,11 @@ class Studentview_model extends CI_Model
* */
public function getStudentCourse($studentId=null){
$this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,SM.SessionName');
$this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName');
$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');
$this->db->join( SESSIONMASTER . ' as SM', 'SM.SessionID = SCU.SessionID');
// $this->db->join( SESSIONMASTER . ' as SM', 'SM.SessionID = SCU.SessionID');
$this->db->where('SCU.StudentID', $studentId);
$courseDetails = $this->db->get();
if($courseDetails->result()){
@ -93,7 +93,7 @@ class Studentview_model extends CI_Model
$fetchData['CourseName']=$row->CourseName;
$fetchData['UniversityID']=$row->UniversityID;
$fetchData['UniversityName']=$row->UniversityName;
$fetchData['SessionName']=$row->SessionName;
// $fetchData['SessionName']=$row->SessionName;
$fetchData['EnrollmentID']=$row->EnrollmentID;
// get student fees details
$fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID);
@ -123,8 +123,10 @@ class Studentview_model extends CI_Model
* */
public function getStudentFeesDetails($studentID=null,$courseID=null){
$this->db->distinct();
$this->db->select('SFS.FeesID,SFS.FeesType,SFS.SessionName,SFS.RollNo,ifnull(SFS.CourseFees,0) as CourseFees,ifnull(SFS.STFOrWR,0) as STFOrWR,ifnull(SFS.Waiver,0) as Waiver,ifnull(SFS.Others,0) as Others,CF.Sem_Year,CF.FeesType as CourseFeesType');
$this->db->select('SFS.FeesID,SFS.FeesType,SFS.RollNo,ifnull(SFS.CourseFees,0) as CourseFees,ifnull(SFS.STFOrWR,0) as STFOrWR,ifnull(SFS.Waiver,0) as Waiver,ifnull(SFS.Others,0) as Others,CF.Sem_Year,CF.FeesType as CourseFeesType,SM.SessionName,SM1.SessionName as ToSessionName');
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
$this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName');
$this->db->join(SESSIONMASTER.' as SM1', 'SM1.SessionID = SFS.ToSessionName','left');
$this->db->join(STUDENTS_FEES_PAID.' as SFP','SFP.FeesId = SFS.FeesID','left');
$this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType');
$this->db->where('SFS.CourseID', $courseID);
@ -137,6 +139,13 @@ class Studentview_model extends CI_Model
$storePaidDetails['FeesName'] = $feeRow->Sem_Year;
$storePaidDetails['CourseFees'] = $feeRow->CourseFees;
$storePaidDetails['SessionName'] = $feeRow->SessionName;
if($feeRow->ToSessionName=='' || $feeRow->ToSessionName==null){
$storePaidDetails['ToSessionName'] = "Not Applicable";
}
else{
$storePaidDetails['ToSessionName'] = $feeRow->ToSessionName;
}
$storePaidDetails['RollNo'] = $feeRow->RollNo;
$storePaidDetails['STFOrWR'] = $feeRow->STFOrWR;
$storePaidDetails['Waiver'] = $feeRow->Waiver;
@ -201,7 +210,8 @@ class Studentview_model extends CI_Model
$storePaidDetails['FeesID'] = $feeRow->FeesID;
$storePaidDetails['FeesName'] = $feeRow->FeesType;
$storePaidDetails['CourseFees'] = $feeRow->CourseFees;
$storePaidDetails['SessionName'] = $feeRow->SessionName;
$storePaidDetails['SessionName'] = "Not Applicable";
$storePaidDetails['ToSessionName'] = "Not Applicable";
$storePaidDetails['RollNo'] = $feeRow->RollNo;
$storePaidDetails['STFOrWR'] = $feeRow->STFOrWR;
$storePaidDetails['Waiver'] = $feeRow->Waiver;