fix: department filters in employee leave balance
diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js
index ecb3e30..68302f6 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js
@@ -30,7 +30,6 @@
"label": __("Department"),
"fieldtype": "Link",
"options": "Department",
- "reqd": 1,
}
]
}
diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
index 02be799..e65220a 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
@@ -32,14 +32,15 @@
return columns
def get_conditions(filters):
- filters = {
+ conditions = {
"status": "Active",
"company": filters.company,
}
- if filters.get("Department"):
- filters.update(filters.get("Department"))
-
- return filters
+ if filters.get("department"):
+ conditions.update({
+ "department": filters.get("department")
+ })
+ return conditions
def get_data(filters, leave_types):
user = frappe.session.user