setfee
This commit is contained in:
parent
b4d638cbd1
commit
765dc84acf
@ -302,6 +302,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
* */
|
* */
|
||||||
$scope.changeSessions = function (details,type) {
|
$scope.changeSessions = function (details,type) {
|
||||||
if(details.SessionName!=undefined && details.SessionName!=''){
|
if(details.SessionName!=undefined && details.SessionName!=''){
|
||||||
|
|
||||||
|
console.log('if');
|
||||||
$scope.sessionDetails=[];
|
$scope.sessionDetails=[];
|
||||||
$scope.sessionDetailsTo=[];
|
$scope.sessionDetailsTo=[];
|
||||||
if(type==1){
|
if(type==1){
|
||||||
@ -313,7 +315,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
|
|
||||||
if(details.ProgramType=='Y001' && details.SNo=='1'){
|
if(details.ProgramType=='Y001' && details.SNo=='1'){
|
||||||
|
|
||||||
|
//console.log('if1')
|
||||||
// get session details
|
// get session details
|
||||||
var found = $filter('getById')($scope.masterSessionDetails, details.SessionName);
|
var found = $filter('getById')($scope.masterSessionDetails, details.SessionName);
|
||||||
|
|
||||||
@ -335,9 +337,16 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
}
|
}
|
||||||
else if(details.ProgramType=='Y001' && details.SNo!='1'){
|
else if(details.ProgramType=='Y001' && details.SNo!='1'){
|
||||||
|
|
||||||
|
// console.log('if else1')
|
||||||
|
|
||||||
if($scope.feesStructureInfo[0].SessionName!=''){
|
if($scope.feesStructureInfo[0].SessionName!=''){
|
||||||
|
|
||||||
|
// console.log('else if if')
|
||||||
// get session details
|
// get session details
|
||||||
var found = $filter('getById')($scope.masterSessionDetails, $scope.feesStructureInfo[details.SNo-2].SessionName);
|
var found = $filter('getById')($scope.masterSessionDetails, $scope.feesStructureInfo[details.SNo-2].SessionName);
|
||||||
|
|
||||||
|
//console.log(found)
|
||||||
|
|
||||||
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
|
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
|
||||||
|
|
||||||
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
||||||
@ -352,10 +361,15 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log($scope.sessionDetails)
|
||||||
}
|
}
|
||||||
|
|
||||||
// after branch changes
|
// after branch changes
|
||||||
else{
|
else{
|
||||||
|
|
||||||
|
// console.log('else if else')
|
||||||
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
||||||
|
|
||||||
if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID){
|
if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID){
|
||||||
@ -375,6 +389,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
|
// console.log('else')
|
||||||
// get session details
|
// get session details
|
||||||
var found = $filter('getById')($scope.masterSessionDetails, details.SessionName);
|
var found = $filter('getById')($scope.masterSessionDetails, details.SessionName);
|
||||||
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
|
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
|
||||||
@ -402,9 +418,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("function else");
|
|
||||||
|
|
||||||
|
// console.log('function else')
|
||||||
|
// alert("function else");
|
||||||
if(details.ProgramType=='Y001' && details.SNo!='1'){
|
if(details.ProgramType=='Y001' && details.SNo!='1'){
|
||||||
alert("else if");
|
// alert("else if");
|
||||||
$scope.sessionDetails=[];
|
$scope.sessionDetails=[];
|
||||||
$scope.sessionDetailsTo=[];
|
$scope.sessionDetailsTo=[];
|
||||||
if(type==1){
|
if(type==1){
|
||||||
@ -455,7 +474,7 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("else else");
|
//alert("else else");
|
||||||
$scope.sessionDetails=[];
|
$scope.sessionDetails=[];
|
||||||
$scope.sessionDetailsTo=[];
|
$scope.sessionDetailsTo=[];
|
||||||
|
|
||||||
@ -852,6 +871,7 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
$scope.sessionDetails=[];
|
$scope.sessionDetails=[];
|
||||||
$scope.setfeedetails='';
|
$scope.setfeedetails='';
|
||||||
$scope.readonlycheck ="";
|
$scope.readonlycheck ="";
|
||||||
|
$scope.lastsetfee ='';
|
||||||
$scope.getStudentSetFees = function (ID,courseID,studeID) {
|
$scope.getStudentSetFees = function (ID,courseID,studeID) {
|
||||||
$scope.BatchDetails=[];
|
$scope.BatchDetails=[];
|
||||||
$scope.sessionDetails=[];
|
$scope.sessionDetails=[];
|
||||||
@ -884,9 +904,9 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
// console.log(response.data.sessionDetails);
|
// console.log(response.data.sessionDetails);
|
||||||
|
|
||||||
$scope.setfeedetails=response.data.feesetDetails;
|
$scope.setfeedetails=response.data.feesetDetails;
|
||||||
//console.log($scope.setfeedetails);return false;
|
console.log($scope.setfeedetails);
|
||||||
$scope.masterSessionDetails =response.data.sessionDetails;
|
$scope.masterSessionDetails =response.data.sessionDetails;
|
||||||
//console.log($scope.masterSessionDetails);
|
console.log($scope.masterSessionDetails);
|
||||||
|
|
||||||
if($scope.setfeedetails.length != 0)
|
if($scope.setfeedetails.length != 0)
|
||||||
{
|
{
|
||||||
@ -910,13 +930,39 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
// $scope.masterSessionDetails=dateListDescService.getOrderByList($scope.masterSessionDetails);
|
// $scope.masterSessionDetails=dateListDescService.getOrderByList($scope.masterSessionDetails);
|
||||||
// end for service call
|
// end for service call
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.feesStructureInfo=response.data.feesDetails;
|
$scope.feesStructureInfo=response.data.feesDetails;
|
||||||
|
|
||||||
|
|
||||||
|
$scope.temfee = response.data.feesDetails;
|
||||||
|
|
||||||
|
// console.log($scope.feesStructureInfo);
|
||||||
|
var lastval ='';
|
||||||
|
var loopc = true;
|
||||||
|
|
||||||
|
angular.forEach($scope.temfee,function (temfee,key)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(loopc)
|
||||||
|
{
|
||||||
|
if(temfee.FeesAssignID !='' )
|
||||||
|
{
|
||||||
|
lastval = key;
|
||||||
|
$scope.lastsetfee= key;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//$scope.setModel.feesType = $scope.feesStructureInfo[lastval];
|
||||||
|
|
||||||
|
console.log($scope.lastsetfee);
|
||||||
|
|
||||||
$scope.setModel = {
|
$scope.setModel = {
|
||||||
"feesType": $scope.feesStructureInfo[0],
|
"feesType": $scope.feesStructureInfo[$scope.lastsetfee],
|
||||||
};
|
};
|
||||||
angular.forEach($scope.feesStructureInfo[0].batchDetails,function (values,key) {
|
angular.forEach($scope.feesStructureInfo[$scope.lastsetfee].batchDetails,function (values,key) {
|
||||||
var parts = values.BatchDate.split("-");
|
var parts = values.BatchDate.split("-");
|
||||||
$scope.BatchDetails.push({
|
$scope.BatchDetails.push({
|
||||||
"BatchCode":values.BatchCode,
|
"BatchCode":values.BatchCode,
|
||||||
@ -928,17 +974,17 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
// call service for make a list in desc order based on date
|
// call service for make a list in desc order based on date
|
||||||
$scope.BatchDetails=dateListDescService.getOrderByList($scope.BatchDetails);
|
$scope.BatchDetails=dateListDescService.getOrderByList($scope.BatchDetails);
|
||||||
|
|
||||||
$scope.setTotalAmount=$scope.feesStructureInfo[0].PayableFees;
|
$scope.setTotalAmount=$scope.feesStructureInfo[$scope.lastsetfee].PayableFees;
|
||||||
$rootScope.updateMoreItems=[];
|
$rootScope.updateMoreItems=[];
|
||||||
|
|
||||||
if($scope.feesStructureInfo[0].InstallmentDetails == '') {
|
if($scope.feesStructureInfo[$scope.lastsetfee].InstallmentDetails == '') {
|
||||||
|
|
||||||
// console.log('in')
|
console.log('in')
|
||||||
|
|
||||||
$scope.obj = $scope.feesStructureInfo[0].batchDetails.find(x => x.IsDefault == true);
|
$scope.obj = $scope.feesStructureInfo[$scope.lastsetfee].batchDetails.find(x => x.IsDefault == true);
|
||||||
if($scope.obj==undefined || $scope.obj=='' || $scope.obj==null){
|
if($scope.obj==undefined || $scope.obj=='' || $scope.obj==null){
|
||||||
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[0].batchDetails[0].BatchCode;
|
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[$scope.lastsetfee].batchDetails[0].BatchCode;
|
||||||
$scope.BatchDate = new Date($scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(6,10)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(3,5)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(0,2));
|
$scope.BatchDate = new Date($scope.feesStructureInfo[$scope.lastsetfee].batchDetails[0].BatchDate.substring(6,10)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(3,5)+'-'+$scope.feesStructureInfo[0].batchDetails[0].BatchDate.substring(0,2));
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -949,7 +995,7 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.calculateInstallemnts($scope.feesStructureInfo[0],$scope.setTotalAmount);
|
$scope.calculateInstallemnts($scope.feesStructureInfo[$scope.lastsetfee],$scope.setTotalAmount);
|
||||||
|
|
||||||
// get session details
|
// get session details
|
||||||
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
||||||
@ -963,7 +1009,7 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//console.log($scope.sessionDetails)
|
///console.log($scope.feesStructureInfo)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -971,33 +1017,33 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
||||||
//console.log('in else')
|
console.log('in else')
|
||||||
/* $scope.myModelInstallemt.ID=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].ID;
|
/* $scope.myModelInstallemt.ID=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].ID;
|
||||||
|
|
||||||
$scope.myModelInstallemt.name=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].Name;
|
$scope.myModelInstallemt.name=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].Name;
|
||||||
$scope.myModelInstallemt.amount=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].Amount;
|
$scope.myModelInstallemt.amount=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].Amount;
|
||||||
$scope.myModelInstallemt.date=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].DueDate;
|
$scope.myModelInstallemt.date=$scope.feesStructureInfo[0].InstallmentDetails[$scope.feesStructureInfo[0].InstallmentDetails.length-1].DueDate;
|
||||||
$rootScope.lastInstallemtDate = $scope.myModelInstallemt.date;*/
|
$rootScope.lastInstallemtDate = $scope.myModelInstallemt.date;*/
|
||||||
for(var i=0; i < $scope.feesStructureInfo[0].InstallmentDetails.length; i++){
|
for(var i=0; i < $scope.feesStructureInfo[$scope.lastsetfee].InstallmentDetails.length; i++){
|
||||||
$rootScope.updateMoreItems.push($scope.feesStructureInfo[0].InstallmentDetails[i]);
|
$rootScope.updateMoreItems.push($scope.feesStructureInfo[$scope.lastsetfee].InstallmentDetails[i]);
|
||||||
|
|
||||||
$scope.getDateArray.push({
|
$scope.getDateArray.push({
|
||||||
|
|
||||||
"Date":new Date($scope.feesStructureInfo[0].InstallmentDetails[i].DueDate.substring(6,10)+'-'+$scope.feesStructureInfo[0].InstallmentDetails[i].DueDate.substring(3,5)+'-'+$scope.feesStructureInfo[0].InstallmentDetails[i].DueDate.substring(0,2))
|
"Date":new Date($scope.feesStructureInfo[$scope.lastsetfee].InstallmentDetails[i].DueDate.substring(6,10)+'-'+$scope.feesStructureInfo[$scope.lastsetfee].InstallmentDetails[i].DueDate.substring(3,5)+'-'+$scope.feesStructureInfo[$scope.lastsetfee].InstallmentDetails[i].DueDate.substring(0,2))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[0].BatchCode;
|
$scope.setModel.feesType.BatchCode = $scope.feesStructureInfo[$scope.lastsetfee].BatchCode;
|
||||||
$scope.ExistSessionDate="";
|
$scope.ExistSessionDate="";
|
||||||
// get session details
|
// get session details
|
||||||
var found = $filter('getById')($scope.masterSessionDetails, $scope.feesStructureInfo[0].SessionName);
|
var found = $filter('getById')($scope.masterSessionDetails, $scope.feesStructureInfo[$scope.lastsetfee].SessionName);
|
||||||
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
|
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
|
||||||
//console.log($scope.ExistSessionDate);
|
//console.log($scope.ExistSessionDate);
|
||||||
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
|
||||||
|
|
||||||
if(svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID || $scope.feesStructureInfo[0].ToSessionName==svalues.SessionID){
|
if(svalues.IsActive=='1' || $scope.feesStructureInfo[$scope.lastsetfee].SessionName==svalues.SessionID || $scope.feesStructureInfo[$scope.lastsetfee].ToSessionName==svalues.SessionID){
|
||||||
$scope.sessionDetails.push({
|
$scope.sessionDetails.push({
|
||||||
"SessionName":svalues.SessionName ,
|
"SessionName":svalues.SessionName ,
|
||||||
"SessionID":svalues.SessionID,
|
"SessionID":svalues.SessionID,
|
||||||
@ -1016,11 +1062,12 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
|
|||||||
});
|
});
|
||||||
|
|
||||||
// console.log($scope.sessionDetails)
|
// console.log($scope.sessionDetails)
|
||||||
$scope.setModel.feesType.SessionName=$scope.feesStructureInfo[0].SessionName;
|
$scope.setModel.feesType.SessionName=$scope.feesStructureInfo[$scope.lastsetfee].SessionName;
|
||||||
$scope.setModel.feesType.ToSessionName=$scope.feesStructureInfo[0].ToSessionName;
|
$scope.setModel.feesType.ToSessionName=$scope.feesStructureInfo[$scope.lastsetfee].ToSessionName;
|
||||||
$scope.dateValidations();
|
$scope.dateValidations();
|
||||||
|
|
||||||
console.log($scope.setModel.feesType.SessionName);
|
//console.log($scope.setModel.feesType.SessionName);
|
||||||
|
// console.log($scope.feesStructureInfo)
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -31,13 +31,13 @@
|
|||||||
ng-model="setModel.feesType"
|
ng-model="setModel.feesType"
|
||||||
ng-options="fees.Sem_Year for fees in feesStructureInfo"
|
ng-options="fees.Sem_Year for fees in feesStructureInfo"
|
||||||
required>
|
required>
|
||||||
<!-- <option value=""> Select Fees Type</option>-->
|
<option value=""> Select Fees Type</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="error text-small block"
|
<span class="error text-small block"
|
||||||
ng-if="Form.setfeesType.$dirty && Form.setfeesType.$invalid">Fees type is required</span>
|
ng-if="Form.setfeesType.$dirty && Form.setfeesType.$invalid">Fees type is required</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{readonlycheck}}
|
<!-- {{readonlycheck}} -->
|
||||||
<div class="col-md-3 form-group"
|
<div class="col-md-3 form-group"
|
||||||
ng-class="{'has-error':Form.batchCode.$dirty && Form.batchCode.$invalid, 'has-success':Form.batchCode.$valid}" ng-if="setModel.feesType.Sem_Year!='TC' && setModel.feesType.Sem_Year!='PC' && setModel.feesType.Sem_Year!='DC' && setModel.feesType.Sem_Year!='MC' && setModel.feesType.Sem_Year!='OTHER'">
|
ng-class="{'has-error':Form.batchCode.$dirty && Form.batchCode.$invalid, 'has-success':Form.batchCode.$valid}" ng-if="setModel.feesType.Sem_Year!='TC' && setModel.feesType.Sem_Year!='PC' && setModel.feesType.Sem_Year!='DC' && setModel.feesType.Sem_Year!='MC' && setModel.feesType.Sem_Year!='OTHER'">
|
||||||
<label>
|
<label>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user