set fees delete options changes

This commit is contained in:
gandhimathi 2018-05-15 11:46:07 +05:30
parent 024705f854
commit 54da321768

View File

@ -199,6 +199,42 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
/*
* Delete set fees for student
* */
$scope.deleteSetFees = function (masterDetails,p) {
SweetAlert.swal({
title: "Warning!",
text: "Want to delete "+p.Sem_Year+" Fees ?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#d43f3a",
confirmButtonText: "Yes!"
}, function (res) {
if (res === true) {
var deleteSetFees = {
method: 'POST',
url: apiPoint.url + 'deleteSetFeesDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
feesAssignID: p.FeesAssignID,
requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
}
};
$http(deleteSetFees).then(function (response) {
if (response.data.deleteStatus == true) {
$scope.getStudentSetFees(masterDetails.ID,masterDetails.CourseID,masterDetails.StudentID);
swal(" ", response.data.message, "success");
} else {
swal(" ", response.data.message, "error");
}
});
}
});
}
/*
* update total fees amount after change value