From 6890aff108f4cf151b594d7f99ffc0ddb4429cf6 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 24 Feb 2018 18:50:51 +0530 Subject: [PATCH] fees issues fixed --- .../assets/js/controllers/feesStatusCtrl.js | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 5bb02971..30cf6788 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -552,7 +552,19 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * createdcby kms * */ $scope.changeBatch = function (Details) { - $scope.setFeesTotalAmount(Details,'2','2'); + + + + if(Details.InstallmentDetails != ''){ + $scope.setFeesTotalAmount(Details,'2','2'); + } + else{ + $rootScope.updateMoreItems=[]; + $scope.setModel.feesType.Others = ''; + + $scope.setFeesTotalAmount(Details,'1','1'); + + } } @@ -649,7 +661,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * change installment values * */ $scope.changeInstallemt = function (model,form) { - 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=[]; @@ -1042,10 +1053,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * created by kms * */ $scope.calculateInstallemntsExist = function (model,totAmt,other,type,type1) { - - var exBatchDate = moment($scope.BatchDate); - if(type==2 || type==1){ if($rootScope.updateMoreItems.length>0){ var exDatenew1; @@ -1059,9 +1067,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n else{ exDatenew1 = moment($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate); } - if (exDatenew1 <= exBatchDate) { - if(type=='1'){ $scope.setTotalAmount = Math.round(parseInt(totAmt)-parseInt(other)); // $scope.setModel.feesType.Others = Math.round(parseInt(other));