course details changes done

This commit is contained in:
gandhimathi 2018-03-10 17:10:11 +05:30
parent 7fd00d5199
commit 53adc117dc

View File

@ -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);
}