diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php
index af94c78e..3513cdca 100755
--- a/Apollo/api/application/models/Fees_status_model.php
+++ b/Apollo/api/application/models/Fees_status_model.php
@@ -915,6 +915,7 @@ class Fees_status_model extends CI_Model
}
$result_array['sessionDetails'] = $this->getSession($student);
+ $result_array['feesetDetails'] = $this->GetFeeSetDetails($student);
return $result_array;
@@ -1808,7 +1809,7 @@ $REGID='';
$this->db->join(COURSE.' as CU', 'CU.UniversityID = US.UniversityID');
// $this->db->where('SD.IsActive','1');
// $this->db->order_by('CU.CreatedOn','DESC');
- $this->db->order_by('SM.SessionID','DESC');
+ $this->db->order_by('SM.SessionID','ASC');
$this->db->where('CU.CourseID',$details['CourseID']);
$this->db->where('US.BranchCode',$details['BranchCode']);
$this->db->where('SM.BranchCode',$details['BranchCode']);
@@ -2174,4 +2175,30 @@ $REGID='';
}
+
+
+
+ public function GetFeeSetDetails($student)
+ {
+ //print_r($student);
+ $this->db->select('FeesID,BatchCode,StudentID,SM.CourseID,SM.FeesType,Sem_Year');
+ $this->db->from(STUDENTS_FEES_STATUS.' as SM');
+ $this->db->join('T_Course_Fees_Details','T_Course_Fees_Details.ID=SM.FeesType');
+ $this->db->where('SM.CourseID',$student['CourseID']);
+ $this->db->where('SM.StudentID',$student['StudentID']);
+ $this->db->where('SM.BranchCode',$student['BranchCode']);
+
+ $setDetails = $this->db->get();
+ if($setDetails->result())
+ {
+ return $setDetails->result();
+ }
+
+ else
+ {
+ //return false;
+ return $setDetails->result();
+ }
+ }
+
}
\ No newline at end of file
diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js
index 637870c6..2edf216a 100755
--- a/Apollo/assets/js/controllers/feesStatusCtrl.js
+++ b/Apollo/assets/js/controllers/feesStatusCtrl.js
@@ -237,6 +237,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* */
$scope.viewId=-1;
$scope.setFees = function (p) {
+
$scope.BatchDate ='';
$scope.editId=-1;
@@ -401,9 +402,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
}
else{
-
+ alert("function else");
if(details.ProgramType=='Y001' && details.SNo!='1'){
-
+ alert("else if");
$scope.sessionDetails=[];
$scope.sessionDetailsTo=[];
if(type==1){
@@ -430,6 +431,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
});
+
+$scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
}
else{
@@ -452,6 +455,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
else{
+ alert("else else");
$scope.sessionDetails=[];
$scope.sessionDetailsTo=[];
@@ -846,6 +850,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.BatchDetails=[];
$scope.masterSessionDetails="";
$scope.sessionDetails=[];
+ $scope.setfeedetails='';
+ $scope.readonlycheck ="";
$scope.getStudentSetFees = function (ID,courseID,studeID) {
$scope.BatchDetails=[];
$scope.sessionDetails=[];
@@ -857,6 +863,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.myModelInstallemt.date="";
$rootScope.lastInstallemtDate="";
$rootScope.updateMoreItems=[];
+
var setFees = {
method: 'POST',
url: apiPoint.url + 'getStudentFeesAssign/',
@@ -873,17 +880,38 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
};
$http(setFees).then(function (response) {
if (response.data.status==200 && response.data.feesStatus) {
+
+ // console.log(response.data.sessionDetails);
+
+ $scope.setfeedetails=response.data.feesetDetails;
+ //console.log($scope.setfeedetails);return false;
+ $scope.masterSessionDetails =response.data.sessionDetails;
+ //console.log($scope.masterSessionDetails);
+
+ if($scope.setfeedetails.length != 0)
+ {
+
+ $scope.readonlycheck =true;
+ }
+ else
+ {
+
+ $scope.readonlycheck =false;
+ }
- $scope.masterSessionDetails = response.data.sessionDetails;
+ // $scope.masterSessionDetails = response.data.sessionDetails;
+ //console.log($scope.masterSessionDetails);
// service call for session master list in desc order based on date
angular.forEach($scope.masterSessionDetails,function (fvalue,fkey) {
var parts = fvalue.SessionDate.split("-");
fvalue.givenDateObject=new Date(parts[2], parts[1] - 1, parts[0]);
});
- $scope.masterSessionDetails=dateListDescService.getOrderByList($scope.masterSessionDetails);
+ // $scope.masterSessionDetails=dateListDescService.getOrderByList($scope.masterSessionDetails);
// end for service call
+
+
$scope.feesStructureInfo=response.data.feesDetails;
$scope.setModel = {
"feesType": $scope.feesStructureInfo[0],
@@ -905,6 +933,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
if($scope.feesStructureInfo[0].InstallmentDetails == '') {
+ // console.log('in')
+
$scope.obj = $scope.feesStructureInfo[0].batchDetails.find(x => x.IsDefault == true);
if($scope.obj==undefined || $scope.obj=='' || $scope.obj==null){
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[0].batchDetails[0].BatchCode;
@@ -933,12 +963,15 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
});
+ //console.log($scope.sessionDetails)
+
+
}
else {
-
+//console.log('in else')
/* $scope.myModelInstallemt.ID=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].ID;
$scope.myModelInstallemt.name=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].Name;
@@ -961,7 +994,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
// get session details
var found = $filter('getById')($scope.masterSessionDetails, $scope.feesStructureInfo[0].SessionName);
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
-
+//console.log($scope.ExistSessionDate);
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID || $scope.feesStructureInfo[0].ToSessionName==svalues.SessionID){
@@ -982,10 +1015,13 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
});
+ // console.log($scope.sessionDetails)
$scope.setModel.feesType.SessionName=$scope.feesStructureInfo[0].SessionName;
$scope.setModel.feesType.ToSessionName=$scope.feesStructureInfo[0].ToSessionName;
$scope.dateValidations();
+ console.log($scope.setModel.feesType.SessionName);
+
}
} else {
$scope.feesStructureInfo="";
@@ -1120,6 +1156,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* change installment values
* */
$scope.changeInstallemt = function (model,form) {
+
+ //alert('in')
if(model.Sem_Year!='TC' && model.Sem_Year!='PC' && model.Sem_Year!='DC' && model.Sem_Year!='MC' && model.Sem_Year!='OTHER'){
$scope.BatchDetails=[];
$rootScope.updateMoreItems=[];
@@ -1194,6 +1232,33 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
// form.$setPristine(true);
+ // console.log($scope.setfeedetails)
+
+ //console.log('im');
+
+ var loopcheck = true;
+ angular.forEach($scope.setfeedetails,function (setfeedetails,skey)
+ {
+ if(loopcheck)
+ {
+ if(setfeedetails.Sem_Year == model.Sem_Year )
+ {
+ $scope.readonlycheck =true;
+ loopcheck = false;
+ }
+ else
+ {
+ $scope.readonlycheck =false;
+ }
+ }
+
+
+
+ });
+
+
+
+
}
$scope.setTotalAmount='';
/*
diff --git a/Apollo/assets/views/status-update/setFeesForStudent.html b/Apollo/assets/views/status-update/setFeesForStudent.html
index 51727068..d23037bc 100755
--- a/Apollo/assets/views/status-update/setFeesForStudent.html
+++ b/Apollo/assets/views/status-update/setFeesForStudent.html
@@ -27,7 +27,7 @@
-