From 86aed90a5c28133aaf995b687a0a5c75b3222ab9 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Wed, 27 Jun 2018 11:13:20 +0530 Subject: [PATCH] [Fix] - Get payroll period days (#14686) * Fix - get_payroll_period_days * Fix - get_payroll_period_days --- .../employee_benefit_application.py | 2 +- erpnext/hr/doctype/payroll_period/payroll_period.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/employee_benefit_application/employee_benefit_application.py b/erpnext/hr/doctype/employee_benefit_application/employee_benefit_application.py index 913eec8bc3..97ab07cb01 100644 --- a/erpnext/hr/doctype/employee_benefit_application/employee_benefit_application.py +++ b/erpnext/hr/doctype/employee_benefit_application/employee_benefit_application.py @@ -112,7 +112,7 @@ def get_max_benefits_remaining(employee, on_date, payroll_period): if max_benefits and max_benefits > 0: have_depends_on_lwp = False 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) # Get all salary slip flexi amount in the payroll period diff --git a/erpnext/hr/doctype/payroll_period/payroll_period.py b/erpnext/hr/doctype/payroll_period/payroll_period.py index e1c9e75562..8990d754e8 100644 --- a/erpnext/hr/doctype/payroll_period/payroll_period.py +++ b/erpnext/hr/doctype/payroll_period/payroll_period.py @@ -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])) working_days -= len(holidays) return working_days, actual_no_of_days - return False + return False, False