Inactive employees show up in report
This commit is contained in:
parent
5136a64d12
commit
b7ae1c1076
@ -27,7 +27,7 @@ def execute(filters=None):
|
|||||||
total_p = total_a = 0.0
|
total_p = total_a = 0.0
|
||||||
for day in range(filters["total_days_in_month"]):
|
for day in range(filters["total_days_in_month"]):
|
||||||
status = att_map.get(emp).get(day + 1, "None")
|
status = att_map.get(emp).get(day + 1, "None")
|
||||||
status_map = {"Present": "P", "Absent": "A", "Half Day": "H", "None":" "}
|
status_map = {"Present": "P", "Absent": "A", "Half Day": "H", "None": ""}
|
||||||
row.append(status_map[status])
|
row.append(status_map[status])
|
||||||
|
|
||||||
if status == "Present":
|
if status == "Present":
|
||||||
@ -39,7 +39,6 @@ def execute(filters=None):
|
|||||||
total_a += 0.5
|
total_a += 0.5
|
||||||
|
|
||||||
row += [total_p, total_a]
|
row += [total_p, total_a]
|
||||||
|
|
||||||
data.append(row)
|
data.append(row)
|
||||||
|
|
||||||
return columns, data
|
return columns, data
|
||||||
@ -96,9 +95,8 @@ def get_conditions(filters):
|
|||||||
def get_employee_details():
|
def get_employee_details():
|
||||||
emp_map = frappe._dict()
|
emp_map = frappe._dict()
|
||||||
for d in frappe.db.sql("""select name, employee_name, designation,
|
for d in frappe.db.sql("""select name, employee_name, designation,
|
||||||
department, branch, company
|
department, branch, company, status
|
||||||
from tabEmployee where docstatus < 2
|
from tabEmployee""", as_dict=1):
|
||||||
and status = 'Active'""", as_dict=1):
|
|
||||||
emp_map.setdefault(d.name, d)
|
emp_map.setdefault(d.name, d)
|
||||||
|
|
||||||
return emp_map
|
return emp_map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user