diff --git a/brewman/static/scripts/salary-deduction.js b/brewman/static/scripts/salary-deduction.js index 885f12f9..fea17737 100644 --- a/brewman/static/scripts/salary-deduction.js +++ b/brewman/static/scripts/salary-deduction.js @@ -47,7 +47,7 @@ var SalaryDeductionCtrl = ['$scope', '$location', 'asDateFilter', '$modal', 'vou } function getPf(grossSalary, daysWorked, daysInMonth) { - var limit = 6500, + var limit = 15000, employeeRate = 0.12, employerRate = 0.12 + 0.011 + 0.005 + 0.0001, employee = (grossSalary > limit) ? 0 : Math.ceil(employeeRate * grossSalary * daysWorked / daysInMonth), @@ -56,7 +56,7 @@ var SalaryDeductionCtrl = ['$scope', '$location', 'asDateFilter', '$modal', 'vou } $scope.add = function () { - var oldJournal = getOldItem($scope.employee.LedgerID, this.voucher.SalaryDeductions), + var oldJournal = getOldItem($scope.employee.LedgerID, $scope.voucher.SalaryDeductions), grossSalary = parseInt($scope.grossSalary, 10), daysWorked = parseInt($scope.daysWorked, 10), daysInMonth = daysInMonthFunction($scope.voucher.Date), @@ -66,7 +66,7 @@ var SalaryDeductionCtrl = ['$scope', '$location', 'asDateFilter', '$modal', 'vou if (!angular.isUndefined(oldJournal)) { $scope.toasts.push({Type: 'Danger', Message: 'Employee has already been added!'}); } else { - this.voucher.SalaryDeductions.push({ + $scope.voucher.SalaryDeductions.push({ Journal: {Ledger: $scope.employee}, GrossSalary: grossSalary, DaysWorked: daysWorked, @@ -83,8 +83,8 @@ var SalaryDeductionCtrl = ['$scope', '$location', 'asDateFilter', '$modal', 'vou }; $scope.remove = function (deduction) { - var index = this.voucher.SalaryDeductions.indexOf(deduction); - this.voucher.SalaryDeductions.splice(index, 1); + var index = $scope.voucher.SalaryDeductions.indexOf(deduction); + $scope.voucher.SalaryDeductions.splice(index, 1); }; $scope.preventAlteration = function (voucher) { diff --git a/brewman/views/services/voucher/salary_deduction.py b/brewman/views/services/voucher/salary_deduction.py index f70341a7..5f0b7b95 100644 --- a/brewman/views/services/voucher/salary_deduction.py +++ b/brewman/views/services/voucher/salary_deduction.py @@ -101,7 +101,7 @@ def esi_contribution(gross_salary, days_worked, days_in_month): def pf_contribution(gross_salary, days_worked, days_in_month): - limit = 6500 + limit = 15000 employee_rate = .12 employer_rate = .12 + .011 + .005 + .0001 employee = 0 if gross_salary > limit else ceil(employee_rate * gross_salary * days_worked / days_in_month)