From 6f88cabcb7740994b4531875895bb12a057d786a Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 17 Apr 2018 13:17:21 +0530 Subject: [PATCH] batch options in fees screen changes done --- Apollo/api/application/models/Fees_status_model.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index dd7c698b..67a82e08 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -78,10 +78,11 @@ class Fees_status_model extends CI_Model * created by kms * */ public function getStudentFeesStructure($student=null){ - $this->db->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees,SM.SessionName as SessionName,SM1.SessionName as ToSessionName'); + $this->db->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees,SM.SessionName as SessionName,SM1.SessionName as ToSessionName,BA.BatchCode,BA.BatchName'); $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(BATCH.' as BA', 'BA.BatchCode = SFS.BatchCode'); $this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType'); $this->db->join(COURSE.' as CU', 'CU.CourseID = CF.CourseID'); $this->db->where('SFS.CourseID',$student['CourseID']); @@ -100,6 +101,7 @@ class Fees_status_model extends CI_Model $fetchData['Waiver'] = $row->Waiver; $fetchData['Others'] = $row->Others; $fetchData['SessionName'] = $row->SessionName; + $fetchData['BatchName'] = $row->BatchName; if($row->ToSessionName=='' OR $row->ToSessionName==null){ $fetchData['ToSessionName'] = "Not Applicable"; } @@ -198,6 +200,7 @@ class Fees_status_model extends CI_Model $fetchData['Others'] = $row->Others; $fetchData['SessionName'] = "Not Applicable"; $fetchData['ToSessionName'] = "Not Applicable"; + $fetchData['BatchName'] = "Not Applicable"; $fetchData['RollNo'] = $row->RollNo; $fetchData['PayableFees'] = $row->CourseFees + $row->STFOrWR + $row->Others - $row->Waiver; @@ -236,11 +239,12 @@ class Fees_status_model extends CI_Model $serachArray=[WAIVER,REFERRAL]; $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,ST.Firstname,ST.MobileNumber,ST.Fathername,CU.CourseName,CU.CourseID,CF.Sem_Year,STC.EnrollmentID,US.UniversityName,US.UniversityShortName,SM.SessionName,SM1.SessionName as ToSessionName,CF.ProgramType'); + $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,ST.Firstname,ST.MobileNumber,ST.Fathername,CU.CourseName,CU.CourseID,CF.Sem_Year,STC.EnrollmentID,US.UniversityName,US.UniversityShortName,SM.SessionName,SM1.SessionName as ToSessionName,CF.ProgramType,BA.BatchCode,BA.BatchName'); $this->db->from(STUDENTS_FEES_PAID.' as SFP'); $this->db->join(STUDENTS_FEES_STATUS.' as SFS','SFP.FeesId = SFS.FeesID'); $this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName'); $this->db->join(SESSIONMASTER.' as SM1', 'SM1.SessionID = SFS.ToSessionName','left'); + $this->db->join(BATCH.' as BA', 'BA.BatchCode = SFS.BatchCode'); $this->db->join(STUDENTS.' as ST', 'ST.StudentID = SFS.StudentID'); $this->db->join(COURSE.' as CU', 'CU.CourseID = SFS.CourseID'); $this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType'); @@ -265,6 +269,7 @@ class Fees_status_model extends CI_Model else{ $storePaidDetails['ToSessionName'] = $feeRow->ToSessionName; } + $storePaidDetails['BatchName'] = $feeRow->BatchName; $storePaidDetails['RollNo'] = $feeRow->RollNo; $storePaidDetails['STFOrWR'] = $feeRow->STFOrWR; @@ -367,6 +372,7 @@ class Fees_status_model extends CI_Model $storePaidDetails['CourseFees'] = $feeRow->CourseFees; $storePaidDetails['SessionName'] = "Not Applicable"; $storePaidDetails['ToSessionName'] = "Not Applicable"; + $storePaidDetails['BatchName'] = "Not Applicable"; $storePaidDetails['RollNo'] = $feeRow->RollNo; $storePaidDetails['STFOrWR'] = $feeRow->STFOrWR; $storePaidDetails['Waiver'] = $feeRow->Waiver;