diff --git a/Apollo/api/application/controllers/Fees_Status_Controller.php b/Apollo/api/application/controllers/Fees_Status_Controller.php index 817e8eb0..f6a0870d 100755 --- a/Apollo/api/application/controllers/Fees_Status_Controller.php +++ b/Apollo/api/application/controllers/Fees_Status_Controller.php @@ -248,10 +248,12 @@ class Fees_Status_Controller extends REST_Controller { $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); $details['BatchCode'] = $this->post('batchCode'); $details['BranchCode'] = $this->post('branchCode'); - + $details['Comments'] = $this->post('comments'); $jsonInstallmenData = $this->post('installmentItems'); - + //print_r($details); $updateDetails = $this->Fees_model->setFees($details,$jsonInstallmenData);// Check if the users data store contains users (in case the database result returns NULL) + + if ($updateDetails) { $updateDetails['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index 8005ca09..0c878633 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -81,7 +81,7 @@ class Fees_status_model extends CI_Model * */ public function getStudentFeesStructure($student=null){ $this->db->distinct(); - $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->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Comments,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'); @@ -102,6 +102,7 @@ class Fees_status_model extends CI_Model $fetchData['ProgramType'] = $row->ProgramType; $fetchData['ActualFees'] = $row->CourseFees; $fetchData['STFOrWR'] = $row->STFOrWR; + $fetchData['Comments'] = $row->Comments; $fetchData['Waiver'] = $row->Waiver; $fetchData['Others'] = $row->Others; $fetchData['SessionName'] = $row->SessionName; @@ -182,7 +183,7 @@ class Fees_status_model extends CI_Model { $serachArray = ["PC","TC","DC","MC","OTHER"]; - $this->db->select('SFS.FeesID,SFS.FeesType,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.SessionName,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees'); + $this->db->select('SFS.FeesID,SFS.FeesType,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Comments,SFS.Waiver,SFS.Others,SFS.SessionName,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees'); $this->db->from(STUDENTS_FEES_STATUS . ' as SFS'); //$this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType'); $this->db->join(COURSE . ' as CU', 'CU.CourseID = SFS.CourseID'); @@ -201,6 +202,7 @@ class Fees_status_model extends CI_Model $fetchData['ProgramType'] = $row->FeesType; $fetchData['ActualFees'] = $row->CourseFees; $fetchData['STFOrWR'] = $row->STFOrWR; + $fetchData['Comments'] = $row->Comments; $fetchData['Waiver'] = $row->Waiver; $fetchData['Others'] = $row->Others; $fetchData['SessionName'] = "Not Applicable"; @@ -245,7 +247,7 @@ 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,BA.BatchCode,BA.BatchName'); + $this->db->select('SFS.FeesID,SFS.FeesType,SFS.RollNo,SFS.Comments,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'); @@ -282,6 +284,7 @@ class Fees_status_model extends CI_Model $storePaidDetails['RollNo'] = $feeRow->RollNo; $storePaidDetails['STFOrWR'] = $feeRow->STFOrWR; + $storePaidDetails['Comments'] = $feeRow->Comments; $storePaidDetails['Waiver'] = $feeRow->Waiver; $storePaidDetails['Others'] = $feeRow->Others; $storePaidDetails['PayableAmount'] = $feeRow->CourseFees+$feeRow->STFOrWR+$feeRow->Others-$feeRow->Waiver; @@ -362,7 +365,7 @@ class Fees_status_model extends CI_Model public function existStudentCourseDefaultFees($student=null){ $serachArray = ["PC","TC","DC","MC","OTHER"]; $this->db->distinct(); - $this->db->select('SFS.FeesID,SFS.FeesType,SFS.SessionName,SFS.ToSessionName,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,STC.EnrollmentID,US.UniversityName,US.UniversityShortName'); + $this->db->select('SFS.FeesID,SFS.FeesType,SFS.Comments,SFS.SessionName,SFS.ToSessionName,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,STC.EnrollmentID,US.UniversityName,US.UniversityShortName'); $this->db->from(STUDENTS_FEES_PAID.' as SFP'); $this->db->join(STUDENTS_FEES_STATUS.' as SFS','SFP.FeesId = SFS.FeesID'); $this->db->join(STUDENTS.' as ST', 'ST.StudentID = SFS.StudentID'); @@ -389,6 +392,7 @@ class Fees_status_model extends CI_Model $storePaidDetails['ToSessionName'] = "Not Applicable"; $storePaidDetails['BatchName'] = "Not Applicable"; $storePaidDetails['RollNo'] = $feeRow->RollNo; + $storePaidDetails['Comments'] = $feeRow->Comments; $storePaidDetails['STFOrWR'] = $feeRow->STFOrWR; $storePaidDetails['Waiver'] = $feeRow->Waiver; $storePaidDetails['Others'] = $feeRow->Others; @@ -734,7 +738,7 @@ class Fees_status_model extends CI_Model $result_array['feesStatus']=true; foreach ($feesDetails->result() as $row){ $SNoValue=$SNoValue+1; - $this->db->select('SFS.FeesID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.SessionName,SFS.ToSessionName,SFS.RollNo,SFS.BatchCode,SM.SessionName as MasterSessionName,SM1.SessionName as MasterToSessionName'); + $this->db->select('SFS.FeesID,SFS.CourseFees,SFS.Comments,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.SessionName,SFS.ToSessionName,SFS.RollNo,SFS.BatchCode,SM.SessionName as MasterSessionName,SM1.SessionName as MasterToSessionName'); $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'); @@ -752,6 +756,7 @@ class Fees_status_model extends CI_Model $fetchData['ActualFees']=$existData[0]->CourseFees; $fetchData['BatchCode']=$existData[0]->BatchCode; $fetchData['STFOrWR']=$existData[0]->STFOrWR; + $fetchData['Comments']=$existData[0]->Comments; $fetchData['Waiver']=$existData[0]->Waiver; $fetchData['Others']=$existData[0]->Others; $fetchData['SessionName']=$existData[0]->SessionName; @@ -980,7 +985,7 @@ class Fees_status_model extends CI_Model // default course fees details in student status foreach ($myArray as $row1){ - $this->db->select('FeesID,CourseFees,STFOrWR,Waiver,Others,SessionName,ToSessionName,RollNo'); + $this->db->select('FeesID,CourseFees,STFOrWR,Waiver,Comments,Others,SessionName,ToSessionName,RollNo'); $this->db->where('StudentID',$student['StudentID']); $this->db->where('CourseID',$student['CourseID']); $this->db->where('FeesType',$row1['Sem_Year']); @@ -995,6 +1000,7 @@ class Fees_status_model extends CI_Model $fetchData['Sem_Year']=$row1['Sem_Year']; $fetchData['ActualFees']=$existData[0]->CourseFees; $fetchData['STFOrWR']=$existData[0]->STFOrWR; + $fetchData['Comments']=$existData[0]->Comments; $fetchData['Waiver']=$existData[0]->Waiver; $fetchData['Others']=$existData[0]->Others; $fetchData['SessionName']=$existData[0]->SessionName; @@ -1064,6 +1070,7 @@ class Fees_status_model extends CI_Model * created by kms * */ public function setFees($details=null,$jsonData=null){ + $this->db->select('FeesID'); $this->db->where('CourseID', $details['CourseID']); $this->db->where('StudentID', $details['StudentID']); @@ -1076,6 +1083,7 @@ class Fees_status_model extends CI_Model $updateDetails['BatchCode'] = $details['BatchCode']; $updateDetails['RollNo'] = $details['RollNo']; $updateDetails['STFOrWR'] = $details['STFOrWR']; + $updateDetails['Comments'] = $details['Comments']; $updateDetails['Waiver'] = $details['Waiver']; $updateDetails['Others'] = $details['Others']; $updateDetails['UpdatedOn'] = $details['CreatedOn']; @@ -1267,7 +1275,7 @@ class Fees_status_model extends CI_Model $this->db->where('FIN.DueDate',$tomorrowDATE); // $this->db->where('SFP.IsActive','1'); $getStudentDetails = $this->db->get(); - + if ($getStudentDetails->result()){ foreach ($getStudentDetails->result() as $row){ $this->db->select('ifnull(SUM((SFP.BillAmount)),0) as BillAmount'); diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 51dc7472..a1cedcd8 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -193,7 +193,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.editId=-1; $scope.getStudentSetFees(p.ID,p.CourseID,p.StudentID); $scope.viewId=p.ID; - + } @@ -233,7 +233,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID)){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, }); @@ -254,7 +254,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, }); @@ -291,7 +291,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID || $scope.feesStructureInfo[0].ToSessionName==svalues.SessionID){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, }); @@ -299,7 +299,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.sessionDetailsTo.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, }); } @@ -331,7 +331,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName , "SessionID":svalues.SessionID, }); @@ -366,7 +366,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if(svalues.IsActive=='1' ){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, }); @@ -384,7 +384,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID || $scope.feesStructureInfo[0].ToSessionName==svalues.SessionID){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName , "SessionID":svalues.SessionID, }); @@ -392,7 +392,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.sessionDetailsTo.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName , "SessionID":svalues.SessionID, }); } @@ -472,6 +472,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n billDate: $scope.billDate, billAmount:updateModel.billAmount, modeOfPayment: updateModel.paymentOn.paymentOn, + commentsForStudent: updateModel.studComments, internalComments: updateModel.internalComments, createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID, @@ -518,7 +519,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n /* * set fees for student * */ - $scope.submitFeesForStudent = function (myModel, form,updateModel, loading) { + $scope.submitFeesForStudent = function (myModel,form,updateModel,loading) { + var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -614,8 +616,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.ldloading5 = {}; $scope.ldloading5[loading.replace('-', '_')] = true; - - var updateFees = { method: 'POST', url: apiPoint.url + 'setFeesForStudent/', @@ -628,6 +628,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n courseAmount:updateModel.ActualFees, feesID: updateModel.ID, STFWR:updateModel.STFOrWR, + comments:updateModel.Comments, waiver: updateModel.Waiver, other: updateModel.Others, session: updateModel.SessionName, @@ -800,7 +801,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n angular.forEach($scope.masterSessionDetails,function (svalues,skey) { if(svalues.IsActive=='1'){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, }); } @@ -841,7 +842,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID || $scope.feesStructureInfo[0].ToSessionName==svalues.SessionID){ $scope.sessionDetails.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName , "SessionID":svalues.SessionID, }); @@ -849,7 +850,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.sessionDetailsTo.push({ - "SessionName":svalues.SessionName +'('+svalues.SessionDate+')', + "SessionName":svalues.SessionName , "SessionID":svalues.SessionID, }); } diff --git a/Apollo/assets/views/status-update/setFeesForStudent.html b/Apollo/assets/views/status-update/setFeesForStudent.html index 938113ef..9154e71e 100755 --- a/Apollo/assets/views/status-update/setFeesForStudent.html +++ b/Apollo/assets/views/status-update/setFeesForStudent.html @@ -60,7 +60,7 @@ - +
@@ -71,7 +71,7 @@ Session + Max 100 Characters. + +