get_payroll_period return name, fix hard coded leave period
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user