diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 02f6558b..7108913c 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -360,6 +360,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.myModelInstallemt.amount=""; $scope.myModelInstallemt.date=""; $rootScope.updateMoreItems=[]; + $scope.setTotalAmount=''; form.$setPristine(true); } else { @@ -566,10 +567,44 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.myModelInstallemt.date=""; $rootScope.lastInstallemtDate=""; } + $scope.setFeesTotalAmount(model); form.$setPristine(true); } + $scope.setTotalAmount=''; + /* + * get set fees total amount + * */ + $scope.setFeesTotalAmount = function (values) { + if(values.ActualFees=='' || values.ActualFees==null || values.ActualFees==undefined){ + $scope.actFees=0; + } + else{ + $scope.actFees=values.ActualFees; + } + if(values.Others=='' || values.Others==null || values.Others==undefined){ + $scope.othersFees=0; + } + else{ + $scope.othersFees=values.Others; + } + if(values.STFOrWR=='' || values.STFOrWR==null || values.STFOrWR==undefined){ + $scope.stfFees=0; + } + else{ + $scope.stfFees=values.STFOrWR; + } + if(values.Waiver=='' || values.Waiver==null || values.Waiver==undefined){ + $scope.wiverFees=0; + } + else{ + $scope.wiverFees=values.Waiver; + } + + $scope.setTotalAmount= parseInt($scope.actFees) + parseInt($scope.stfFees) + parseInt($scope.othersFees) - parseInt($scope.wiverFees); + + }