fix: showing wrong record (#21884)
diff --git a/erpnext/hr/desk_page/hr/hr.json b/erpnext/hr/desk_page/hr/hr.json
index 2d0e885..33132a6 100644
--- a/erpnext/hr/desk_page/hr/hr.json
+++ b/erpnext/hr/desk_page/hr/hr.json
@@ -89,11 +89,10 @@
"docstatus": 0,
"doctype": "Desk Page",
"extends_another_page": 0,
- "hide_custom": 0,
"idx": 0,
"is_standard": 1,
"label": "HR",
- "modified": "2020-05-20 11:20:54.255557",
+ "modified": "2020-05-23 12:41:52.543438",
"modified_by": "Administrator",
"module": "HR",
"name": "HR",
@@ -127,7 +126,7 @@
"type": "DocType"
},
{
- "label": "Salary Register",
+ "label": "Monthly Attendance Sheet",
"link_to": "Monthly Attendance Sheet",
"type": "Report"
},
diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
index 60767b5..47daab1 100644
--- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
+++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
@@ -135,7 +135,7 @@
row += [emp, emp_det.employee_name]
total_p = total_a = total_l = total_h = total_um= 0.0
- ggg = []
+ emp_status_map = []
for day in range(filters["total_days_in_month"]):
status = None
status = att_map.get(emp).get(day + 1)
@@ -152,11 +152,10 @@
status = "Holiday"
total_h += 1
- ggg.append(status_map.get(status, ""))
+ abbr = status_map.get(status, "")
+ emp_status_map.append(abbr)
- if not filters.summarized_view:
- row += ggg
- else:
+ if filters.summarized_view:
if status == "Present" or status == "Work From Home":
total_p += 1
elif status == "Absent":
@@ -170,6 +169,9 @@
elif not status:
total_um += 1
+ if not filters.summarized_view:
+ row += emp_status_map
+
if filters.summarized_view:
row += [total_p, total_l, total_a, total_h, total_um]
@@ -203,7 +205,7 @@
row.append("0.0")
row.extend([time_default_counts[0][0],time_default_counts[0][1]])
- emp_att_map[emp] = ggg
+ emp_att_map[emp] = emp_status_map
record.append(row)
return record, emp_att_map
@@ -216,7 +218,7 @@
columns = [_(filters.group_by)+ ":Link/Branch:120"]
columns += [
- _("Employee") + ":Link/Employee:120", _("Employee Name") + ":Link/Employee:120"
+ _("Employee") + ":Link/Employee:120", _("Employee Name") + ":Data/:120"
]
days = []
for day in range(filters["total_days_in_month"]):