Fix: Changed formula of Service Charge to update the new way of keeping accounts

Fix: Changed the limit of ESI in line with govt. regulations
This commit is contained in:
tanshu 2018-07-16 17:32:44 +05:30
parent 1c10eec4ca
commit f8162f364d
4 changed files with 5 additions and 5 deletions

View File

@ -330,7 +330,7 @@ def service_charge_employees(date, dbsession):
.filter(Voucher.type != VoucherType.by_name('Issue').id) \
.filter(Journal.account_id == Account.service_charge_id()) \
.scalar()
amount = 0 if amount is None else amount * Decimal(.7) * Decimal(.9) * -1
amount = 0 if amount is None else amount * Decimal(.9) * -1
return details, amount

View File

@ -91,7 +91,7 @@ def add_salary_deduction(item, days_in_month, voucher, dbsession):
def esi_contribution(gross_salary, days_worked, days_in_month):
limit = 15000
limit = 21000
employee_rate = .0175
employer_rate = .0475
employee = 0 if gross_salary > limit else ceil(employee_rate * gross_salary * days_worked / days_in_month)

View File

@ -18,7 +18,7 @@ def service_charge_create_voucher(json, user, dbsession):
employees = get_employees(get_first_day(date), date + datetime.timedelta(1), json['incentives'],
dbsession=dbsession)
amount = balance(date, dbsession=dbsession) * Decimal(.7) * Decimal(.9)
amount = balance(date, dbsession=dbsession) * Decimal(.9)
total_points = 0
for item in employees:
@ -59,7 +59,7 @@ def service_charge_update_voucher(voucher, json, user, dbsession):
voucher.journals,
dbsession=dbsession
)
amount = balance(date, voucher.id, dbsession) * Decimal(.7) * Decimal(.9)
amount = balance(date, voucher.id, dbsession) * Decimal(.9)
total_points = 0
for item in employees:

View File

@ -150,7 +150,7 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
}
getEsi(grossSalary, daysWorked, daysInMonth) {
const limit = 15000,
const limit = 21000,
employeeRate = 0.0175,
employerRate = 0.0475,
employee = (grossSalary > limit) ? 0 : Math.ceil(employeeRate * grossSalary * daysWorked / daysInMonth),