re register changes in fees screen

This commit is contained in:
gandhimathi 2018-08-16 17:43:20 +05:30
parent b6661e0712
commit a47c315fcc

View File

@ -200,7 +200,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$http(getStudent).then(function (response) {
if (response.data.status==200 && response.data.studentStatus) {
$scope.studentInfo=response.data.details;
console.log($scope.studentInfo);
} else {
$scope.studentInfo="";
@ -287,11 +286,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* update total fees amount after change value
* created by kms
* */
$scope.changeTotalFees = function (model) {
$scope.changeTotalFees = function (model,form) {
//User wants to manually enter fees amount
//$scope.updateModel.billAmount = model.BalanceAmount;
$scope.updateModel.date = $filter('date')(new Date(), 'dd-MM-yyyy');
$scope.updateModel.billAmount="";
form.billAmount.$setPristine(true);
}
@ -2203,10 +2203,30 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}, true);*/
/* receive fees total bill amount watch function */
$scope.$watch('updateModel.billAmount', function (newValue,oldValue) {
if(parseInt(newValue) && parseInt(newValue)<=parseInt($scope.updateModel.feesType.BalanceAmount)){
$scope.payableAmtInfo=parseInt($scope.updateModel.feesType.BalanceAmount)-parseInt(newValue);
}
else if(parseInt(newValue) && parseInt(newValue)>parseInt($scope.updateModel.feesType.BalanceAmount)){
$scope.payableAmtInfo=0;
}
else{
$scope.payableAmtInfo=$scope.updateModel.feesType.BalanceAmount;
}
});
/* watch function for receive fees semd year options changes */
$scope.$watch('updateModel.feesType.BalanceAmount', function (newValue,oldValue) {
if(parseInt(newValue)){
$scope.payableAmtInfo=newValue;
}
else {
$scope.payableAmtInfo = 0;
}
});
}]);
@ -2469,9 +2489,7 @@ app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log"
*/
$scope.reregisterPDF = function(student){
//alert();
//console.log($scope.studentInfo);
//console.log($scope.viewId);
var coursefiltered = $scope.studentInfo.filter((universitycourse)=>universitycourse.ID == $scope.viewId);
//console.log(coursefiltered);
var getsubject = {
@ -2530,7 +2548,7 @@ $scope.open = function(coursefiltered,Subjects,sem){
// return false;
var modalInstance = $modal.open({
templateUrl: 'assets/views/reregistration/reregistrationformpdf.html',
controller: 'feesStatusCtrl',
controller: 'studentModalDemoCtrl',
// size: size,
resolve: {
pdfitems: function () {
@ -2547,17 +2565,11 @@ $scope.open = function(coursefiltered,Subjects,sem){
});
};
$scope.generatePDF = function(){
// alert();
console.log($scope.Course);
var sem = "Sem/Year:"+$scope.sem;
var universityaddress = encodeURIComponent($scope.Course.Address).replace(/[%2C %20]/g,' ');
$scope.universityAddress = universityaddress.replace(" "," ");;
$scope.universitydetails = "Mobile: "+$scope.Course.MobileNumber+",E-mail id:"+$scope.Course.EmailID+
$scope.universitydetails = "Mobile: "+$scope.Course.UnivMobileNumber+",E-mail id:"+$scope.Course.EmailID+
",Website:-";
$scope.Enroll = "Enrolment No: ";
$scope.courseDetails = "Course Name: "+$scope.Course.CourseName+" specialization: "+$scope.Course.Specilization +sem
@ -2581,7 +2593,6 @@ $scope.open = function(coursefiltered,Subjects,sem){
var universityCap = universityname.toUpperCase();
var doc = new jsPDF('A4');
var img = document.getElementById("logo");
console.log(img);
var canvas = document.createElement("canvas");
canvas.width = 100;
canvas.height = 100;