mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
add get leave period method
This commit is contained in:
@@ -49,3 +49,9 @@ def update_employee(employee, details, cancel=False):
|
||||
new_data = get_datetime(new_data)
|
||||
setattr(employee, item.fieldname, new_data)
|
||||
return employee
|
||||
|
||||
|
||||
def get_leave_period(from_date, to_date, company):
|
||||
return frappe.db.sql("""select name from `tabLeave Period`
|
||||
where is_active=1 and company=%s
|
||||
and to_date >= %s and from_date <= %s""", (company, to_date, from_date))
|
||||
|
||||
Reference in New Issue
Block a user