diff --git a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js index f9d57b3cef..277eaf4e56 100644 --- a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js +++ b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js @@ -83,6 +83,10 @@ frappe.query_reports["Monthly Attendance Sheet"] = { const summarized_view = frappe.query_report.get_filter_value('summarized_view'); const group_by = frappe.query_report.get_filter_value('group_by'); + if (group_by && column.colIndex === 1) { + value = "" + value + ""; + } + if (!summarized_view) { if ((group_by && column.colIndex > 3) || (!group_by && column.colIndex > 2)) { if (value == 'P' || value == 'WFH') diff --git a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py index cf6a8cc97b..3337c5c184 100644 --- a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py +++ b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py @@ -72,12 +72,19 @@ def get_columns(filters: Filters) -> List[Dict]: columns = [] if filters.group_by: + options_mapping = { + "Branch": "Branch", + "Grade": "Employee Grade", + "Department": "Department", + "Designation": "Designation", + } + options = options_mapping.get(filters.group_by) columns.append( { "label": _(filters.group_by), "fieldname": frappe.scrub(filters.group_by), "fieldtype": "Link", - "options": "Branch", + "options": options, "width": 120, } ) @@ -191,7 +198,7 @@ def get_data(filters: Filters, attendance_map: Dict) -> List[Dict]: records = get_rows(employee_details[value], filters, holiday_map, attendance_map) if records: - data.append({group_by_column: frappe.bold(value)}) + data.append({group_by_column: value}) data.extend(records) else: data = get_rows(employee_details, filters, holiday_map, attendance_map)