diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index b5662782..42d0505d 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -622,7 +622,7 @@ class Fees_status_model extends CI_Model * */ public function getCourseDetails($universityID=null) { - $this->db->select('CourseID,CourseName'); + $this->db->select('CourseID,CONCAT(CourseName, "(",CourseCode,")") AS CourseName'); $this->db->where('UniversityID',$universityID); $this->db->where('IsActive','1'); $this->db->order_by('CourseID','ASC'); @@ -1035,35 +1035,6 @@ class Fees_status_model extends CI_Model * created by kms * */ public function insertDayBookMaster($data=null,$paymentID){ - if($data['ModeOfPayment']=='CASH'){ - $insertArray['Date'] = $data['BillDate']; - $insertArray['CreatedBy'] = $data['CreatedBy']; - $insertArray['CreatedOn'] = $data['CreatedOn']; - $insertArray['Description'] = $data['InternalComments']; - $insertArray['Amount'] = $data['BillAmount']; - $insertArray['Status'] = 'Approved'; - $insertArray['PaymentStatus'] = false; - $insertArray['FeesPaymentID'] = $paymentID; - - $insertArray['BranchCode'] = $data['UpdatedBy']; - - $this->db->select('ID,TypeID'); - $this->db->where('TypeID', 'I002'); - $this->db->where('TypeName', 'FEES'); - $getIncome=$this->db->get(INCOMEOUTCOMEMASTER)->last_row(); - - if($getIncome){ - $insertArray['Name'] = $getIncome->TypeID; - $insertArray['Type'] = $getIncome->ID; - $this->db->insert(DAYBOOKMASTER, $insertArray); - return true; - } - else{ - return true; - } - - } - else{ // this is for income entry $insertArray['Date'] = $data['BillDate']; $insertArray['CreatedBy'] = $data['CreatedBy']; @@ -1113,11 +1084,8 @@ class Fees_status_model extends CI_Model $this->db->insert(DAYBOOKMASTER, $expenseArray); } - - return true; - } } diff --git a/Apollo/assets/css/styles.css b/Apollo/assets/css/styles.css index 86cc63c1..e7cdec59 100755 --- a/Apollo/assets/css/styles.css +++ b/Apollo/assets/css/styles.css @@ -11007,7 +11007,7 @@ td.small-width { /* ---------------------------------------------------------------------- */ #page-title { border-bottom: 1px solid #eee; - padding: 50px 0; + padding: 20px 0; position: relative; margin-left: -15px; margin-right: -15px; diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index a8ce4eda..0f77d24b 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -285,7 +285,7 @@ app.controller('studentModalDemoCtrl', ["$scope", "$modal", "$log", "API_POINTS" }); } else { - swal("Failed!", "This student is not registered", "warning"); + swal("Failed!", "This student is not registerd", "warning"); $scope.courseEditLoading = false; $scope.studentDetails = ""; $scope.courseDetails = ""; diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 19b0a4a2..5bb02971 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -493,7 +493,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n angular.forEach($scope.feesStructureInfo[0].batchDetails,function (values,key) { $scope.BatchDetails.push({ "BatchCode":values.BatchCode, - "BatchName":values.BatchName + '-'+ values.BatchCode, + "BatchName":values.BatchName + '('+ values.BatchCode + ')', "BatchDate":values.BatchDate }) }); @@ -656,7 +656,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n angular.forEach(model.batchDetails,function (values,key) { $scope.BatchDetails.push({ "BatchCode":values.BatchCode, - "BatchName":values.BatchName + '-'+ values.BatchCode, + "BatchName":values.BatchName + '('+ values.BatchCode + ')', "BatchDate":values.BatchDate }) }); @@ -887,16 +887,17 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n var dayDiff = moment().diff(bDate, 'days'); var todatlFineAmt = 0; var fineAmt1 = 0; - var fineAmt2 = 0; - var fineAmt3 = 0; - var fineAmt4 = 0; - var fineAmt5 = 0; - var fineAmt6 = 0; - var fineAmt7 = 0; - var fineAmt8 = 0; - var fineAmt9 = 0; - var fineAmt10 = 0; + // var fineAmt2 = 0; + // var fineAmt3 = 0; + // var fineAmt4 = 0; + // var fineAmt5 = 0; + // var fineAmt6 = 0; + // var fineAmt7 = 0; + // var fineAmt8 = 0; + // var fineAmt9 = 0; + // var fineAmt10 = 0; var fineAmt11 = 0; + var countDays = 0; for (var k = 1; k <= dayDiff; k++) { if (k <= 90) { @@ -913,7 +914,21 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } } - else if (k > 90) { + else { + countDays = countDays+1; + + if (countDays<30) { + if(countDays==1){ + fineAmt11 = parseInt(fineAmt11)+300; + } + + } + else{ + countDays=0; + + } + } + /*else if (k > 90) { if (k > 90 && k <= 120) { fineAmt2 = 300; @@ -956,10 +971,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } - } + }*/ } - todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11); + // todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11); + todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11); + if(type=='1'){ $scope.setTotalAmount = Math.round(parseInt(totAmt) + parseInt(todatlFineAmt)-parseInt(other)); $scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt)); @@ -1091,18 +1108,22 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n dayDiff = dayDiff+1; var todatlFineAmt = 0; var fineAmt1 = 0; - var fineAmt2 = 0; - var fineAmt3 = 0; - var fineAmt4 = 0; - var fineAmt5 = 0; - var fineAmt6 = 0; - var fineAmt7 = 0; - var fineAmt8 = 0; - var fineAmt9 = 0; - var fineAmt10 = 0; + // var fineAmt2 = 0; + // var fineAmt3 = 0; + // var fineAmt4 = 0; + // var fineAmt5 = 0; + // var fineAmt6 = 0; + // var fineAmt7 = 0; + // var fineAmt8 = 0; + // var fineAmt9 = 0; + // var fineAmt10 = 0; var fineAmt11 = 0; + var countDays = 0; + for (var k = 1; k <= dayDiff; k++) { + + if (k <= 90) { if (exitPayAmt <= 10000) { @@ -1117,7 +1138,21 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } } - else if (k > 90) { + else { + countDays = countDays+1; + + if (countDays<30) { + if(countDays==1){ + fineAmt11 = parseInt(fineAmt11)+300; + } + + } + else{ + countDays=0; + + } + } + /* else if (k > 90) { if (k > 90 && k <= 120) { fineAmt2 = 300; @@ -1156,14 +1191,28 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } else { - fineAmt11 = 300; + countDays = countDays+1; + + if (countDays<30) { + if(countDays==1){ + fineAmt11 = parseInt(fineAmt11)+300; + } + + + // foo++; + } + else{ + countDays=0; + + } } - } + }*/ } - todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11); + // todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11); + todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11); if(type1=='2'){ $scope.setTotalAmount = Math.round(parseInt(totAmt) -parseInt(other) + parseInt(todatlFineAmt)); $scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt)); @@ -1245,19 +1294,28 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } - - /* $scope.$watch('updateMoreItems', function (newValue, oldValue) { +/* + $scope.$watch('updateMoreItems', function (newValue, oldValue) { for (var i = 0; i < newValue.length; i++) { if (newValue[i].Amount != oldValue[i].Amount) { + var currentValue=0; + var pastValue=0; if(newValue[i].Amount>oldValue[i].Amount){ - var currentValue = parseInt(newValue[i].Amount)-oldValue[i].Amount; + currentValue = parseInt(newValue[i].Amount)-oldValue[i].Amount; } - else{ - var currentValue = oldValue[i].Amount-parseInt(newValue[i].Amount); + else if(newValue[i].Amount