From d561f6dd2ccef2172cb88fd3f1d318de9ae78df4 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 13 Jun 2018 11:35:03 +0530 Subject: [PATCH 1/4] course fees edit changes in fees status --- .../assets/js/controllers/feesStatusCtrl.js | 79 +++++++++++++++---- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index b964c820..e44dd0c8 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -957,17 +957,17 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if(Details.InstallmentDetails != ''){ - $scope.setFeesTotalAmount(Details,'2',Details); + $scope.setFeesTotalAmount(Details,'2',Details,'1'); } else{ /*$scope.$watch('setModel.feesType.BatchCode', function(newValue, oldValue) { if(newValue!=oldValue){ $rootScope.updateMoreItems=[]; - $scope.setFeesTotalAmount(Details,'1',Details); + $scope.setFeesTotalAmount(Details,'1',Details,'1'); } });*/ - $scope.setFeesTotalAmount(Details,'1',Details); + $scope.setFeesTotalAmount(Details,'1',Details,'1'); } @@ -1134,10 +1134,10 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $rootScope.lastInstallemtDate="";*/ $rootScope.updateMoreItems=[]; } - $scope.setFeesTotalAmount(model,'1',model); + $scope.setFeesTotalAmount(model,'1',model,'1'); } else{ - $scope.setFeesTotalAmount(model,'3',model); + $scope.setFeesTotalAmount(model,'3',model,'1'); } @@ -1149,7 +1149,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n /* * get set fees total amount * */ - $scope.setFeesTotalAmount = function (values,type,beforeValues) { + $scope.setFeesTotalAmount = function (values,type,beforeValues,from) { if(type==3 || values.Sem_Year=='TC' || values.Sem_Year=='PC' || values.Sem_Year=='DC' || values.Sem_Year=='MC' || values.Sem_Year=='OTHER'){ if(values.Valid=='0'){ @@ -1189,6 +1189,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } else{ + if($scope.setTotalAmount=='' || $scope.setTotalAmount==null || $scope.setTotalAmount==0){ + $scope.beforeSetTotalAmount=0; + } + else{ + $scope.beforeSetTotalAmount=$scope.setTotalAmount; + } angular.forEach(values.batchDetails,function (values1,key) { if(values1.BatchCode==values.BatchCode){ $scope.BatchDate = new Date(values1.BatchDate.substring(6,10)+'-'+values1.BatchDate.substring(3,5)+'-'+values1.BatchDate.substring(0,2)); @@ -1225,16 +1231,25 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } $scope.setTotalAmount= parseInt($scope.actFees) + parseInt($scope.stfFees) + parseInt($scope.othersFees) - parseInt($scope.wiverFees); - if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length==0){ $scope.calculateInstallemnts(values,$scope.setTotalAmount); } else if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length<=2){ - $scope.calculateDueAmount(values,beforeValues); + if(from=='1'){ + $scope.calculateDueAmount($scope.setTotalAmount,$scope.setTotalAmount); + } + else{ + $scope.calculateDueAmount($scope.beforeSetTotalAmount,$scope.setTotalAmount); + } } else{ - $scope.calculateDueAmount(values,beforeValues); + if(from=='1'){ + $scope.calculateDueAmount($scope.setTotalAmount,$scope.setTotalAmount); + } + else{ + $scope.calculateDueAmount($scope.beforeSetTotalAmount,$scope.setTotalAmount); + } } } @@ -1266,17 +1281,26 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n else{ $scope.wiverFees=values.Waiver; } - $scope.setTotalAmount= parseInt($scope.actFees) + parseInt($scope.stfFees) + parseInt($scope.othersFees) - parseInt($scope.wiverFees); if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length==0){ $scope.calculateInstallemnts(values,$scope.setTotalAmount); } else if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length<=2){ - $scope.calculateDueAmount(values,beforeValues); + if(from=='1'){ + $scope.calculateDueAmount($scope.setTotalAmount,$scope.setTotalAmount); + } + else{ + $scope.calculateDueAmount($scope.beforeSetTotalAmount,$scope.setTotalAmount); + } } else{ - $scope.calculateDueAmount(values,beforeValues); + if(from=='1'){ + $scope.calculateDueAmount($scope.setTotalAmount,$scope.setTotalAmount); + } + else{ + $scope.calculateDueAmount($scope.beforeSetTotalAmount,$scope.setTotalAmount); + } } @@ -1840,7 +1864,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } } - $scope.calculateDueAmount(values,values); + $scope.calculateDueAmount($scope.setTotalAmount,$scope.setTotalAmount); } @@ -1851,8 +1875,31 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n /*while changing installment date/amount calculate fine amount * created by kms * */ - $scope.calculateDueAmount = function (values,beforeValues) { - if(values.ActualFees=='' || values.ActualFees==undefined){ + $scope.calculateDueAmount = function (beforeTot,afterTot) { + if(parseInt(beforeTot)0){ + if(parseInt($scope.finalTotAmt)>0){ + $rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].Amount = parseInt($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].Amount) + parseInt($scope.finalTotAmt); + + } + else{ + if(parseInt($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].Amount) Date: Wed, 13 Jun 2018 11:35:16 +0530 Subject: [PATCH 2/4] course fees edit changes in fees status --- Apollo/assets/views/status-update/setFeesForStudent.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Apollo/assets/views/status-update/setFeesForStudent.html b/Apollo/assets/views/status-update/setFeesForStudent.html index 0db70062..4030b9e1 100755 --- a/Apollo/assets/views/status-update/setFeesForStudent.html +++ b/Apollo/assets/views/status-update/setFeesForStudent.html @@ -156,7 +156,7 @@ + ng-model="setModel.feesType.ActualFees" ng-pattern="/^[0-9]*$/" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" ng-change="setFeesTotalAmount(setModel.feesType,'2',{{setModel.feesType}},'2');" required/> Fees amount is required @@ -173,7 +173,7 @@ + ng-model="setModel.feesType.STFOrWR" ng-pattern="/^[0-9]*$/" ng-change="setFeesTotalAmount(setModel.feesType,'2',{{setModel.feesType}},'2');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/> + ng-model="setModel.feesType.Others" ng-pattern="/^[0-9]*$/" ng-change="setFeesTotalAmount(setModel.feesType,'2',{{setModel.feesType}},'2');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/> Others amount is required @@ -324,7 +324,7 @@ min-date="getDateArray[$index].Date" max-date="getDateArray[$index+2].Date" show-button-bar="false" - close-text="Close" ng-change="calculateDueAmount(setModel.feesType,setModel.feesType);" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" ng-readonly="true" required="required"/> + close-text="Close" ng-change="calculateDueAmount(setTotalAmount,setTotalAmount);" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" ng-readonly="true" required="required"/> Date is required. From 29bf79b8c5e9dfa3f8afdfd0f399292658c9cb09 Mon Sep 17 00:00:00 2001 From: velz Date: Wed, 13 Jun 2018 12:21:45 +0530 Subject: [PATCH 3/4] Hallticket Issue Fixed - Own --- .../js/controllers/generateHallTicketCtrl.js | 25 +++++++++++++------ .../views/hallticket/generatehallticket.html | 4 +-- .../views/hallticket/hallTicketPDF.html | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Apollo/assets/js/controllers/generateHallTicketCtrl.js b/Apollo/assets/js/controllers/generateHallTicketCtrl.js index 6f2264a1..7b0ed919 100755 --- a/Apollo/assets/js/controllers/generateHallTicketCtrl.js +++ b/Apollo/assets/js/controllers/generateHallTicketCtrl.js @@ -262,11 +262,11 @@ $scope.isLoaderTxt = "Loading..."; //console.log('API'); //console.log($scope.pdfModel.studentDetails); //console.log(response.data.hallTicketData.studentDetails.length); - $scope.pdfModel.batchDetails = $scope.myModel.batchName; - $scope.pdfModel.courseDetails = $scope.myModel.courseName; + $scope.pdfModel.batchDetails = $scope.selectedBatchName; + $scope.pdfModel.courseDetails = $scope.selectedCourseName; $scope.pdfModel.centerDetails = $scope.myModel.centerName; $scope.pdfModel.semDataType =response.data.semDataType; - + //console.log($scope.pdfModel); $scope.open($scope.pdfModel); } },function(error){ swal('No Records Found','',error); }); @@ -301,7 +301,17 @@ $scope.isLoaderTxt = "Loading..."; // generate pdf for student view + $scope.captureCourseName = function() + { + + $scope.selectedCourseName = course.options[course.selectedIndex].text; + }; + $scope.captureBatchName = function() + { + + $scope.selectedBatchName = batch.options[batch.selectedIndex].text; + }; @@ -311,17 +321,18 @@ $scope.isLoaderTxt = "Loading..."; // Controller for Hallticket Modal PDF app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", function ($scope, $modalInstance, pdfitems) { - //console.log(pdfitems); + console.log(pdfitems); $scope.localPdfUniverityDetails = pdfitems.universityDetails; $scope.universityNamePDF = $scope.localPdfUniverityDetails[0].UniversityName; $scope.universityAddressPDF = $scope.localPdfUniverityDetails[0].Address; $scope.universityEmailPDF = $scope.localPdfUniverityDetails[0].EmailID; $scope.universityLogoPDF = $scope.localPdfUniverityDetails[0].ProfilePicPath; - $scope.batchNamePDF = pdfitems.batchDetails.BatchName; - $scope.courseNamePDF = pdfitems.courseDetails.CourseName; + $scope.batchNamePDF = pdfitems.batchDetails;//.BatchName; + $scope.courseNamePDF = pdfitems.courseDetails;//.CourseName; $scope.centerNamePDF = pdfitems.centerDetails.CenterName+''+ pdfitems.centerDetails.CenterAddress; $scope.semDataTypePDF = pdfitems.semDataType; - //console.log($scope.semDataTypePDF); + console.log($scope.batchNamePDF); + console.log($scope.courseNamePDF); //console.log($scope.universityNamePDF+'-'+$scope.localPdfUniverityDetails.UniversityName); $scope.localPdfStudentDetails = pdfitems.studentDetails; diff --git a/Apollo/assets/views/hallticket/generatehallticket.html b/Apollo/assets/views/hallticket/generatehallticket.html index df610b73..f7a525f6 100755 --- a/Apollo/assets/views/hallticket/generatehallticket.html +++ b/Apollo/assets/views/hallticket/generatehallticket.html @@ -62,7 +62,7 @@ Course @@ -76,7 +76,7 @@ Batch Name