From 16e924333ea886c5fab476362a3dcb9353f5a33a Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Fri, 25 May 2018 11:04:21 +0530 Subject: [PATCH] get payroll period days - fix --- erpnext/hr/doctype/payroll_period/payroll_period.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/payroll_period/payroll_period.py b/erpnext/hr/doctype/payroll_period/payroll_period.py index c7d87e6c70..66d6a457d6 100644 --- a/erpnext/hr/doctype/payroll_period/payroll_period.py +++ b/erpnext/hr/doctype/payroll_period/payroll_period.py @@ -49,7 +49,9 @@ def get_payroll_period_days(start_date, end_date, company): select start_date, end_date from `tabPayroll Period` where company=%(company)s and ( - start_date between %(start_date)s and %(end_date)s + (%(start_date)s between start_date and end_date) + or (%(end_date)s between start_date and end_date) + or (start_date between %(start_date)s and %(end_date)s) )""", { 'company': company, 'start_date': start_date,