fix: department filters in employee leave balance
This commit is contained in:
parent
2124d9884b
commit
91e62f575e
@ -30,7 +30,6 @@ frappe.query_reports["Employee Leave Balance"] = {
|
|||||||
"label": __("Department"),
|
"label": __("Department"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Department",
|
"options": "Department",
|
||||||
"reqd": 1,
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,14 +32,15 @@ def get_columns(leave_types):
|
|||||||
return columns
|
return columns
|
||||||
|
|
||||||
def get_conditions(filters):
|
def get_conditions(filters):
|
||||||
filters = {
|
conditions = {
|
||||||
"status": "Active",
|
"status": "Active",
|
||||||
"company": filters.company,
|
"company": filters.company,
|
||||||
}
|
}
|
||||||
if filters.get("Department"):
|
if filters.get("department"):
|
||||||
filters.update(filters.get("Department"))
|
conditions.update({
|
||||||
|
"department": filters.get("department")
|
||||||
return filters
|
})
|
||||||
|
return conditions
|
||||||
|
|
||||||
def get_data(filters, leave_types):
|
def get_data(filters, leave_types):
|
||||||
user = frappe.session.user
|
user = frappe.session.user
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user