get_payroll_period return name, fix hard coded leave period

This commit is contained in:
Ranjith
2018-05-17 10:00:33 +05:30
parent 31eeff00f7
commit 58363e6bbd
2 changed files with 3 additions and 3 deletions

View File

@@ -236,7 +236,7 @@ def get_leave_period(from_date, to_date, company):
return leave_period
def get_payroll_period(from_date, to_date, company):
payroll_period = frappe.db.sql("""select pd.parent, pd.start_date, pd.end_date from
payroll_period = frappe.db.sql("""select pp.name, pd.start_date, pd.end_date from
`tabPayroll Period Date` pd join `tabPayroll Period` pp on
pd.parent=pp.name where pd.start_date<=%s and pd.end_date>= %s
and pp.company=%s""", (from_date, to_date, company), as_dict=1)