[Fix] - Get payroll period days (#14686)

* Fix - get_payroll_period_days

* Fix - get_payroll_period_days
This commit is contained in:
Jamsheer 2018-06-27 11:13:20 +05:30 committed by Nabin Hait
parent e2a8120ef8
commit 86aed90a5c
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ def get_max_benefits_remaining(employee, on_date, payroll_period):
if max_benefits and max_benefits > 0: if max_benefits and max_benefits > 0:
have_depends_on_lwp = False have_depends_on_lwp = False
per_day_amount_total = 0 per_day_amount_total = 0
payroll_period_days = get_payroll_period_days(on_date, on_date, employee) payroll_period_days = get_payroll_period_days(on_date, on_date, employee)[0]
payroll_period_obj = frappe.get_doc("Payroll Period", payroll_period) payroll_period_obj = frappe.get_doc("Payroll Period", payroll_period)
# Get all salary slip flexi amount in the payroll period # Get all salary slip flexi amount in the payroll period

View File

@ -67,4 +67,4 @@ def get_payroll_period_days(start_date, end_date, employee):
holidays = get_holidays_for_employee(employee, getdate(payroll_period_dates[0][0]), getdate(payroll_period_dates[0][1])) holidays = get_holidays_for_employee(employee, getdate(payroll_period_dates[0][0]), getdate(payroll_period_dates[0][1]))
working_days -= len(holidays) working_days -= len(holidays)
return working_days, actual_no_of_days return working_days, actual_no_of_days
return False return False, False