From 90287d2b9bef5380bf50453955639a134cca5870 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 4 Sep 2018 10:35:53 +0000 Subject: [PATCH] report_examfeeCtrl.js edited online with Bitbucket --- .../js/controllers/report_examfeeCtrl.js | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Apollo/assets/js/controllers/report_examfeeCtrl.js b/Apollo/assets/js/controllers/report_examfeeCtrl.js index 59771a17..b7f37006 100755 --- a/Apollo/assets/js/controllers/report_examfeeCtrl.js +++ b/Apollo/assets/js/controllers/report_examfeeCtrl.js @@ -98,22 +98,11 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", $scope.show = false; $scope.onSubmit = function (form) { - var firstError = null; - if (form.$invalid) { - var field = null, firstError = null; - $scope.show = true; - for (field in form) { - if (field[0] != '$') { - if (firstError === null && !form[field].$valid) { - firstError = form[field].$batch; - } - if (form[field].$pristine) { - form[field].$dirty = true; - } - } - } - angular.element('.ng-invalid[batch=' + firstError + ']').focus(); + if($scope.univModel.university !== null && $scope.univModel.university !== '' ){ + $scope.filterUniv = angular.fromJson($scope.univModel.university); }else { + $scope.filterUniv = ''; + } //alert($scope.batch.name); $scope.examfee_data = ''; $scope.message = ''; @@ -125,7 +114,7 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", }, data: { branch: JSON.parse(localStorage.getItem('localObj')).localBranchID, - university: $scope.univModel.university.universityID, + university: $scope.filterUniv.universityID, batch: $scope.univModel.batch } @@ -150,7 +139,7 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal", totalf += parseFloat(item.Amount); } return totalf; } - } + } var mystyle = { sheetid: 'EXAM WRITING FEE REPORT',