From ed51624c8d82cf69711cc8bbcffcd2aa2e60c9a6 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 7 Mar 2018 12:08:49 +0530 Subject: [PATCH] course details changes done --- .../application/models/Studentview_model.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 81681d92..bbd38306 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -123,7 +123,7 @@ class Studentview_model extends CI_Model * */ public function getStudentFeesDetails($studentID=null,$courseID=null){ $this->db->distinct(); - $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->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,CF.ProgramType'); $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'); @@ -138,6 +138,7 @@ class Studentview_model extends CI_Model $storePaidDetails['FeesID'] = $feeRow->FeesID; $storePaidDetails['FeesName'] = $feeRow->Sem_Year; $storePaidDetails['CourseFees'] = $feeRow->CourseFees; + $storePaidDetails['ProgramType'] = $feeRow->ProgramType; $storePaidDetails['SessionName'] = $feeRow->SessionName; if($feeRow->ToSessionName=='' || $feeRow->ToSessionName==null){ $storePaidDetails['ToSessionName'] = "Not Applicable"; @@ -171,6 +172,20 @@ class Studentview_model extends CI_Model $this->db->order_by('ID',"ASC"); $this->db->group_by('BillNO'); $storePaidDetails['paidDetails']=$this->db->get(STUDENTS_FEES_PAID)->result(); + // for installment details + $this->load->model('Fees_status_model'); + + $InstallemtResult = $this->Fees_status_model->getInstallmentDetails($feeRow->FeesID); + + if($InstallemtResult != false){ + $storePaidDetails['InstallmentDetails']=$InstallemtResult; + } + else{ + + $storePaidDetails['InstallmentDetails']=""; + + + } $mergeResult[]=$storePaidDetails; } @@ -209,6 +224,7 @@ class Studentview_model extends CI_Model foreach ($getFeeDetails->result() as $feeRow){ $storePaidDetails['FeesID'] = $feeRow->FeesID; $storePaidDetails['FeesName'] = $feeRow->FeesType; + $storePaidDetails['ProgramType'] = $feeRow->FeesType; $storePaidDetails['CourseFees'] = $feeRow->CourseFees; $storePaidDetails['SessionName'] = "Not Applicable"; $storePaidDetails['ToSessionName'] = "Not Applicable"; @@ -236,6 +252,7 @@ class Studentview_model extends CI_Model $this->db->order_by('ID',"ASC"); $this->db->group_by('BillNO'); $storePaidDetails['paidDetails']=$this->db->get(STUDENTS_FEES_PAID)->result(); + $storePaidDetails['InstallmentDetails']=""; $mergeResult[]=$storePaidDetails; }