diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 2d8b234c..7e14abc3 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -315,7 +315,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n angular.forEach($scope.masterSessionDetails,function (svalues,skey) { - if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ + if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ $scope.sessionDetails.push({ "SessionName":svalues.SessionName, "SessionID":svalues.SessionID, @@ -360,7 +360,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n "SessionID":svalues.SessionID, }); - if($scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ + if($scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ $scope.sessionDetailsTo.push({ @@ -394,7 +394,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n angular.forEach($scope.masterSessionDetails,function (svalues,skey) { - if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ + if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ $scope.sessionDetails.push({ "SessionName":svalues.SessionName , "SessionID":svalues.SessionID, @@ -457,7 +457,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n "SessionID":svalues.SessionID, }); - if($scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ + if($scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){ $scope.sessionDetailsTo.push({ @@ -2222,7 +2222,7 @@ app.controller('ModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $ // Please note that $modalInstance represents a modal window (instance) dependency. // It is not the same as the $modal service used above. -app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) { +app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "$timeout", "items","WordsService", function ($scope, $modalInstance, $timeout, items,WordsService) { $scope.items = items; $scope.selected = { @@ -2237,6 +2237,7 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; + //show hide function for pdf design $scope.billNo=""; $scope.receiptNo=""; @@ -2250,7 +2251,13 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo $scope.BranchAddr = ""; $scope.BranchLogo = ""; $scope.FeesReceiptTitle = ""; - $scope.ShowHide = function (pdfValue) { + $scope.myPdfView = ''; + $scope.ShowHide = function (pdfValue,print) { + $timeout(()=> { + //alert(this.print); + $scope.printPdf(print); + }, 0); + $scope.myPdfView = pdfValue; $scope.showButton = true; $scope.billNo = pdfValue.BillNO; $scope.paymentType=pdfValue.ModeOfPayment; @@ -2264,32 +2271,46 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo $scope.FeesReceiptTitle = pdfValue.FeesReceiptTitle; $scope.receiptNo=pdfValue.ReceiptNo; - + + } - $scope.pdfPrint = function (pdf) { - //PDF print - var innerContents = document.getElementById(pdf).innerHTML; - var popupWinindow = window.open('', '_blank', 'width=600,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no'); + //testing for print + + $scope.printPdf = function (print) { + + var innerContents = document.getElementById(print).innerHTML; + + var popupWinindow = window.open('', '_blank', 'width=1200,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no'); popupWinindow.document.open(); - popupWinindow.document.write('
' + innerContents + ''); + popupWinindow.document.write(''); + popupWinindow.document.write(''); + popupWinindow.document.write(innerContents); + popupWinindow.document.write(''); popupWinindow.document.close(); + popupWinindow.focus(); + popupWinindow.print(); + popupWinindow.close(); + + } - $scope.mouseLeave = function(){ - $scope.showButton = false; - $scope.billNo=""; - $scope.sessionName=""; - $scope.paymentType=""; - $scope.billDate=""; - $scope.amountInWords = ""; - $scope.billAmount = ""; - $scope.branchName = ""; - $scope.ReceivedBy=""; - $scope.BranchAddr = ""; - $scope.BranchLogo = ""; - $scope.FeesReceiptTitle=""; - $scope.receiptNo=""; - } + // $scope.mouseLeave = function(){ + // $scope.showButton = false; + // $scope.billNo=""; + // $scope.sessionName=""; + // $scope.paymentType=""; + // $scope.billDate=""; + // $scope.amountInWords = ""; + // $scope.billAmount = ""; + // $scope.branchName = ""; + // $scope.ReceivedBy=""; + // $scope.BranchAddr = ""; + // $scope.BranchLogo = ""; + // $scope.FeesReceiptTitle=""; + // $scope.receiptNo=""; + // } }]); app.directive('visible', function() { diff --git a/Apollo/assets/views/status-update/updateFeesStatus.html b/Apollo/assets/views/status-update/updateFeesStatus.html index 3fde4588..70226422 100755 --- a/Apollo/assets/views/status-update/updateFeesStatus.html +++ b/Apollo/assets/views/status-update/updateFeesStatus.html @@ -423,7 +423,7 @@| Note: Terms & Conditions will be applicable as per University norms Fees once paid will not be refunded at any reasons |