fees issues fixed

This commit is contained in:
gandhimathi 2018-02-24 18:50:51 +05:30
parent 2060a3b3cb
commit 6890aff108

View File

@ -552,7 +552,19 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* createdcby kms * createdcby kms
* */ * */
$scope.changeBatch = function (Details) { $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 * change installment values
* */ * */
$scope.changeInstallemt = function (model,form) { $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'){ if(model.Sem_Year!='TC' && model.Sem_Year!='PC' && model.Sem_Year!='DC' && model.Sem_Year!='MC' && model.Sem_Year!='OTHER'){
$scope.BatchDetails=[]; $scope.BatchDetails=[];
$rootScope.updateMoreItems=[]; $rootScope.updateMoreItems=[];
@ -1042,10 +1053,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* created by kms * created by kms
* */ * */
$scope.calculateInstallemntsExist = function (model,totAmt,other,type,type1) { $scope.calculateInstallemntsExist = function (model,totAmt,other,type,type1) {
var exBatchDate = moment($scope.BatchDate); var exBatchDate = moment($scope.BatchDate);
if(type==2 || type==1){ if(type==2 || type==1){
if($rootScope.updateMoreItems.length>0){ if($rootScope.updateMoreItems.length>0){
var exDatenew1; var exDatenew1;
@ -1059,9 +1067,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
else{ else{
exDatenew1 = moment($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate); exDatenew1 = moment($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate);
} }
if (exDatenew1 <= exBatchDate) { if (exDatenew1 <= exBatchDate) {
if(type=='1'){ if(type=='1'){
$scope.setTotalAmount = Math.round(parseInt(totAmt)-parseInt(other)); $scope.setTotalAmount = Math.round(parseInt(totAmt)-parseInt(other));
// $scope.setModel.feesType.Others = Math.round(parseInt(other)); // $scope.setModel.feesType.Others = Math.round(parseInt(other));