From 53adc117dcbbbecc69436eab2d54dcdb11896311 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 10 Mar 2018 17:10:11 +0530 Subject: [PATCH] course details changes done --- .../assets/js/controllers/feesStatusCtrl.js | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 0488049b..26e401bb 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -209,11 +209,17 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * change session details * created by kms * */ - $scope.changeSessions = function (details) { + $scope.changeSessions = function (details,type) { if(details.SessionName!=undefined && details.SessionName!=''){ $scope.sessionDetails=[]; $scope.sessionDetailsTo=[]; - $scope.setModel.feesType.ToSessionName=""; + if(type==1){ + $scope.setModel.feesType.ToSessionName=""; + } + else{ + $scope.setModel.feesType.ToSessionName=details.ToSessionName; + } + if(details.ProgramType=='Y001' && details.SNo=='1'){ // get session details var found = $filter('getById')($scope.masterSessionDetails, details.SessionName); @@ -305,7 +311,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n if(details.ProgramType=='Y001' && details.SNo!='1'){ $scope.sessionDetails=[]; $scope.sessionDetailsTo=[]; - $scope.setModel.feesType.ToSessionName=""; + if(type==1){ + $scope.setModel.feesType.ToSessionName=""; + } + else{ + $scope.setModel.feesType.ToSessionName=details.ToSessionName; + } if($scope.feesStructureInfo[0].SessionName!=''){ // get session details @@ -800,9 +811,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n }); - $scope.setModel.feesType.SessionName=$scope.feesStructureInfo[0].SessionName; - $scope.setModel.feesType.SessionNameTo=$scope.feesStructureInfo[0].ToSessionName; + $scope.setModel.feesType.ToSessionName=$scope.feesStructureInfo[0].ToSessionName; $scope.dateValidations(); } @@ -956,6 +966,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } $scope.setModel.feesType.BatchCode = model.BatchCode; + /*$scope.setModel.feesType.SessionName=model.SessionName; + $scope.setModel.feesType.ToSessionName=model.ToSessionName;*/ angular.forEach($rootScope.updateMoreItems,function (values,key) { if(values.DueDate.length>10 || values.DueDate.length==undefined){ $rootScope.updateMoreItems[key].DueDate = $filter('date')(values.DueDate,'dd-MM-yyyy'); @@ -966,6 +978,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } else{ $scope.setModel.feesType.BatchCode = $scope.BatchDetails[0].BatchCode; + $scope.BatchDate = new Date($scope.BatchDetails[0].BatchDate.substring(6,10)+'-'+$scope.BatchDetails[0].BatchDate.substring(3,5)+'-'+$scope.BatchDetails[0].BatchDate.substring(0,2)); /* $scope.myModelInstallemt.ID=""; @@ -982,7 +995,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } - form.$setPristine(true); + // form.$setPristine(true); }