[fix][report] Show only active employee in Employee leave balance report
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 1a70f45..d6f865b 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
@@ -9,8 +9,13 @@
def execute(filters=None):
if not filters: filters = {}
- employee_filters = filters.get("company") and \
- [["Employee", "company", "=", filters.get("company")]] or None
+ employee_filters = {
+ "status": "Active"
+ }
+
+ if filters.get("company"):
+ filters["company"] = filters.company
+
employees = runreport(doctype="Employee", fields=["name", "employee_name", "department"],
filters=employee_filters, limit_page_length=None)