diff --git a/hrms/hr/hr_dashboard/attendance/attendance.json b/hrms/hr/hr_dashboard/attendance/attendance.json index 486424563b8..e86055ecf2c 100644 --- a/hrms/hr/hr_dashboard/attendance/attendance.json +++ b/hrms/hr/hr_dashboard/attendance/attendance.json @@ -36,9 +36,10 @@ "docstatus": 0, "doctype": "Dashboard", "idx": 0, + "insights_dashboard": "attendance", "is_default": 0, "is_standard": 1, - "modified": "2022-08-21 18:12:38.531243", + "modified": "2026-09-28 13:54:24.991563", "modified_by": "Administrator", "module": "HR", "name": "Attendance", diff --git a/hrms/hr/hr_dashboard/expense_claims/expense_claims.json b/hrms/hr/hr_dashboard/expense_claims/expense_claims.json index f56321ad073..d9cc51cdd59 100644 --- a/hrms/hr/hr_dashboard/expense_claims/expense_claims.json +++ b/hrms/hr/hr_dashboard/expense_claims/expense_claims.json @@ -33,9 +33,10 @@ "docstatus": 0, "doctype": "Dashboard", "idx": 0, + "insights_dashboard": "expense-claims", "is_default": 0, "is_standard": 1, - "modified": "2022-09-16 11:36:44.704033", + "modified": "2026-09-28 13:54:24.991563", "modified_by": "Administrator", "module": "HR", "name": "Expense Claims", diff --git a/hrms/hr/hr_dashboard/human_resource/human_resource.json b/hrms/hr/hr_dashboard/human_resource/human_resource.json index ba6562d1f6b..c244ba124e5 100644 --- a/hrms/hr/hr_dashboard/human_resource/human_resource.json +++ b/hrms/hr/hr_dashboard/human_resource/human_resource.json @@ -55,9 +55,10 @@ "docstatus": 0, "doctype": "Dashboard", "idx": 0, + "insights_dashboard": "human-resource", "is_default": 0, "is_standard": 1, - "modified": "2024-01-08 14:06:32.104261", + "modified": "2026-09-28 13:54:24.991563", "modified_by": "Administrator", "module": "HR", "name": "Human Resource", diff --git a/hrms/hr/insights_workbook/attendance/attendance.json b/hrms/hr/insights_workbook/attendance/attendance.json new file mode 100644 index 00000000000..a3595e01037 --- /dev/null +++ b/hrms/hr/insights_workbook/attendance/attendance.json @@ -0,0 +1,904 @@ +{ + "charts": { + "attendance-absent-days": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "measure": { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(attendance_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), absent_days)", + "type": "expression" + }, + "measure_name": "Same Months Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "negative_is_better": true, + "shorten": false + } + ], + "number_columns": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(attendance_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day')), absent_days)", + "type": "expression" + }, + "id": "Absent Days", + "measure_name": "Absent Days (This FY)" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "attendance-absent-days", + "query": "attendance-absences-fiscal-year-to-last-month", + "sort_order": 1, + "title": "Absent Days", + "workbook": "attendance" + }, + "attendance-absent-days-by-department": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Absent Days", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "department_name", + "data_type": "String", + "dimension_name": "Department" + } + }, + "y_axis": { + "axis_label": "Days", + "reference_lines": [ + { + "aggregate": "average", + "axis": "y", + "dashed": true, + "id": "c5c54ae0", + "label": "Average", + "measure_name": "Absent Days" + } + ], + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "absent_days", + "data_type": "Decimal", + "measure_name": "Absent Days" + }, + "type": "bar" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "attendance-absent-days-by-department", + "query": "attendance-absences-by-department-fiscal-year-to-last-month", + "sort_order": 5, + "title": "Absent Days by Department", + "workbook": "attendance" + }, + "attendance-attendance-by-month": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "x_axis": { + "dimension": { + "column_name": "attendance_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "axis_label": "Days", + "min": 0, + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "absent_days", + "data_type": "Decimal", + "measure_name": "Absent Days" + }, + "type": "bar" + }, + { + "measure": { + "aggregation": "sum", + "column_name": "leave_days", + "data_type": "Decimal", + "measure_name": "Leave Days" + }, + "type": "bar" + } + ], + "show_axis_label": true, + "stack": true + } + }, + "folder": null, + "name": "attendance-attendance-by-month", + "query": "attendance-attendance-12-months", + "sort_order": 4, + "title": "Absent and Leave Days by Month", + "workbook": "attendance" + }, + "attendance-leave-days": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "measure": { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(attendance_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), leave_days)", + "type": "expression" + }, + "measure_name": "Same Months Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": false + } + ], + "number_columns": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(attendance_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day')), leave_days)", + "type": "expression" + }, + "id": "Leave Days", + "measure_name": "Leave Days (This FY)" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "attendance-leave-days", + "query": "attendance-leave-fiscal-year-to-last-month", + "sort_order": 2, + "title": "Leave Days", + "workbook": "attendance" + }, + "attendance-leave-days-by-leave-type": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Leave Days", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "leave_type", + "data_type": "String", + "dimension_name": "Leave Type" + } + }, + "y_axis": { + "axis_label": "Days", + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "leave_days", + "data_type": "Decimal", + "measure_name": "Leave Days" + }, + "type": "bar" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "attendance-leave-days-by-leave-type", + "query": "attendance-leave-by-leave-type-fiscal-year-to-last-month", + "sort_order": 6, + "title": "Leave Days by Leave Type", + "workbook": "attendance" + }, + "attendance-on-leave-today": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs a week ago", + "measure": { + "data_type": "Integer", + "expression": { + "expression": "distinct_count_if(attendance_date == date_sub(today(), 7, 'day'), employee)", + "type": "expression" + }, + "measure_name": "A Week Ago" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "data_type": "Integer", + "expression": { + "expression": "distinct_count_if(attendance_date == today(), employee)", + "type": "expression" + }, + "id": "On Leave Today", + "measure_name": "On Leave Today" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "attendance-on-leave-today", + "query": "attendance-on-leave-today-and-a-week-ago", + "sort_order": 3, + "title": "On Leave Today", + "workbook": "attendance" + } + }, + "creation": "2026-09-26 21:12:30.181240", + "dashboards": { + "attendance": { + "items": [ + { + "default_operator": "=", + "default_user_key": "Company", + "filter_name": "Company", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-company", + "w": 4, + "x": 0, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 20, + "x": 0, + "y": 0 + } + }, + "links": { + "attendance-absent-days": "`attendance-attendance`.`company`", + "attendance-absent-days-by-department": "`attendance-attendance`.`company`", + "attendance-attendance-by-month": "`attendance-attendance`.`company`", + "attendance-leave-days": "`attendance-attendance`.`company`", + "attendance-leave-days-by-leave-type": "`attendance-attendance`.`company`", + "attendance-on-leave-today": "`attendance-attendance`.`company`" + }, + "type": "filter" + }, + { + "chart": "attendance-absent-days", + "layout": { + "h": 5, + "i": "chart-3ntjflfvuf", + "w": 7, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "attendance-leave-days", + "layout": { + "h": 5, + "i": "chart-3nuslk6mtg", + "w": 7, + "x": 7, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "attendance-on-leave-today", + "layout": { + "h": 5, + "i": "chart-3nubfupoea", + "w": 6, + "x": 14, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 20, + "x": 0, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "attendance-attendance-by-month", + "layout": { + "h": 17, + "i": "chart-3nunndvp1d", + "w": 20, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 13 + } + }, + "type": "chart" + }, + { + "chart": "attendance-absent-days-by-department", + "layout": { + "h": 17, + "i": "chart-3nua77cq96", + "w": 10, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 30 + } + }, + "type": "chart" + }, + { + "chart": "attendance-leave-days-by-leave-type", + "layout": { + "h": 17, + "i": "chart-3nuo76jc0l", + "w": 10, + "x": 10, + "y": 25 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 47 + } + }, + "type": "chart" + } + ], + "name": "attendance", + "title": "Attendance", + "vertical_compact_layout": 1, + "visible_to_roles": [ + { + "role": "HR User" + }, + { + "role": "HR Manager" + } + ], + "workbook": "attendance" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-28 12:09:41.942712", + "modified_by": "Administrator", + "module": "HR", + "name": "attendance", + "owner": "Administrator", + "queries": { + "attendance-absences-by-department-fiscal-year-to-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-absences-by-department-fiscal-year-to-last-month", + "operations": [ + { + "table": { + "query_name": "attendance-absences-fiscal-year-to-last-month", + "type": "query", + "workbook": "attendance" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "attendance_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 6, + "title": "Absences by Department, Fiscal Year to Last Month", + "use_live_connection": 1, + "workbook": "attendance" + }, + "attendance-absences-fiscal-year-to-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-absences-fiscal-year-to-last-month", + "operations": [ + { + "table": { + "query_name": "attendance-attendance", + "type": "query", + "workbook": "attendance" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "absent_days", + "type": "column" + }, + "operator": ">", + "value": 0 + }, + { + "expression": { + "expression": "attendance_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "attendance", + "employee", + "employee_name", + "department_name", + "attendance_date", + "status", + "absent_days" + ], + "type": "select" + } + ], + "sort_order": 2, + "title": "Absences, Fiscal Year to Last Month", + "use_live_connection": 1, + "workbook": "attendance" + }, + "attendance-attendance": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-attendance", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabAttendance", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + }, + { + "expression": { + "expression": "attendance_date <= today()", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "join_condition": { + "left_column": { + "column_name": "department", + "type": "column" + }, + "right_column": { + "column_name": "name", + "type": "column" + } + }, + "join_type": "left", + "select_columns": [ + { + "column_name": "department_name", + "type": "column" + } + ], + "table": { + "data_source": "Site DB", + "table_name": "tabDepartment", + "type": "table" + }, + "type": "join" + }, + { + "data_type": "String", + "expression": { + "expression": "if_null(department_name, 'Not Set')", + "type": "expression" + }, + "new_name": "department_name", + "type": "mutate" + }, + { + "data_type": "String", + "expression": { + "expression": "if_null(leave_type, 'Not Set')", + "type": "expression" + }, + "new_name": "leave_type", + "type": "mutate" + }, + { + "data_type": "String", + "expression": { + "expression": "name", + "type": "expression" + }, + "new_name": "attendance", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "case(status == 'Absent', 1.0, (status == 'Half Day') & (coalesce(half_day_status, '') == 'Absent'), 0.5, 0.0)", + "type": "expression" + }, + "new_name": "absent_days", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "case(status == 'On Leave', 1.0, (status == 'Half Day') & (coalesce(leave_application, '') != ''), 0.5, 0.0)", + "type": "expression" + }, + "new_name": "leave_days", + "type": "mutate" + }, + { + "column_names": [ + "attendance", + "employee", + "employee_name", + "department_name", + "attendance_date", + "status", + "leave_type", + "company", + "absent_days", + "leave_days" + ], + "type": "select" + } + ], + "sort_order": 1, + "title": "Attendance", + "use_live_connection": 1, + "workbook": "attendance" + }, + "attendance-attendance-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-attendance-12-months", + "operations": [ + { + "table": { + "query_name": "attendance-attendance", + "type": "query", + "workbook": "attendance" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "attendance_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + }, + { + "expression": { + "expression": "(absent_days > 0) | (leave_days > 0)", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "attendance", + "employee", + "employee_name", + "department_name", + "attendance_date", + "status", + "absent_days", + "leave_days" + ], + "type": "select" + } + ], + "sort_order": 5, + "title": "Attendance, 12 Months", + "use_live_connection": 1, + "workbook": "attendance" + }, + "attendance-leave-by-leave-type-fiscal-year-to-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-leave-by-leave-type-fiscal-year-to-last-month", + "operations": [ + { + "table": { + "query_name": "attendance-leave-fiscal-year-to-last-month", + "type": "query", + "workbook": "attendance" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "attendance_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 7, + "title": "Leave by Leave Type, Fiscal Year to Last Month", + "use_live_connection": 1, + "workbook": "attendance" + }, + "attendance-leave-fiscal-year-to-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-leave-fiscal-year-to-last-month", + "operations": [ + { + "table": { + "query_name": "attendance-attendance", + "type": "query", + "workbook": "attendance" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "leave_days", + "type": "column" + }, + "operator": ">", + "value": 0 + }, + { + "expression": { + "expression": "attendance_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "attendance", + "employee", + "employee_name", + "department_name", + "attendance_date", + "status", + "leave_type", + "leave_days" + ], + "type": "select" + } + ], + "sort_order": 3, + "title": "Leave, Fiscal Year to Last Month", + "use_live_connection": 1, + "workbook": "attendance" + }, + "attendance-on-leave-today-and-a-week-ago": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "attendance-on-leave-today-and-a-week-ago", + "operations": [ + { + "table": { + "query_name": "attendance-attendance", + "type": "query", + "workbook": "attendance" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "leave_days", + "type": "column" + }, + "operator": ">", + "value": 0 + }, + { + "expression": { + "expression": "(attendance_date == today()) | (attendance_date == date_sub(today(), 7, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "attendance", + "employee", + "employee_name", + "department_name", + "attendance_date", + "status", + "leave_type" + ], + "type": "select" + } + ], + "sort_order": 4, + "title": "On Leave, Today and a Week Ago", + "use_live_connection": 1, + "workbook": "attendance" + } + }, + "title": "Attendance" +} diff --git a/hrms/hr/insights_workbook/expense_claims/expense_claims.json b/hrms/hr/insights_workbook/expense_claims/expense_claims.json new file mode 100644 index 00000000000..5bfb80b90aa --- /dev/null +++ b/hrms/hr/insights_workbook/expense_claims/expense_claims.json @@ -0,0 +1,1439 @@ +{ + "charts": { + "expense-claims-advances-outstanding": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "decimals": 1, + "shorten": true + }, + { + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "sum", + "column_name": "outstanding", + "data_type": "Decimal", + "format": "currency", + "id": "Advances Outstanding", + "measure_name": "Unclaimed Advances" + }, + { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "id": "Advances", + "measure_name": "Advance Count" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-advances-outstanding", + "query": "expense-claims-outstanding-advances", + "sort_order": 4, + "title": "Unclaimed Advances", + "workbook": "expense-claims" + }, + "expense-claims-advances-outstanding-by-employee": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Unclaimed Amount", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" + } + }, + "y_axis": { + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "outstanding", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Unclaimed Amount" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-advances-outstanding-by-employee", + "query": "expense-claims-outstanding-advances", + "sort_order": 8, + "title": "Unclaimed Advances by Employee", + "workbook": "expense-claims" + }, + "expense-claims-approved-expenses": { + "chart_type": "Number", + "config": { + "date_column": { + "column_name": "posting_date", + "data_type": "Date", + "dimension_name": "posting_date" + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "show": "change", + "source": "last year" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "aggregation": "sum", + "column_name": "base_total_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "id": "Approved Expenses", + "measure_name": "Sanctioned Amount (This FY)" + } + ], + "order_by": [], + "sparkline": false, + "window": { + "span": "fiscal year to date" + } + }, + "folder": null, + "name": "expense-claims-approved-expenses", + "query": "expense-claims-approved-claims", + "sort_order": 1, + "title": "Sanctioned Amount", + "workbook": "expense-claims" + }, + "expense-claims-approved-expenses-by-department": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Sanctioned Amount", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "department", + "data_type": "String", + "dimension_name": "Department" + } + }, + "y_axis": { + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_total_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Sanctioned Amount" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-approved-expenses-by-department", + "query": "expense-claims-approved-claims-fiscal-year", + "sort_order": 7, + "title": "Sanctioned Amount by Department (This FY)", + "workbook": "expense-claims" + }, + "expense-claims-approved-expenses-by-expense-type": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 8, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Sanctioned Amount", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "expense_type", + "data_type": "String", + "dimension_name": "Expense Type" + } + }, + "y_axis": { + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Sanctioned Amount" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-approved-expenses-by-expense-type", + "query": "expense-claims-approved-claim-lines-fiscal-year", + "sort_order": 6, + "title": "Sanctioned Amount by Expense Type (This FY)", + "workbook": "expense-claims" + }, + "expense-claims-approved-expenses-by-month": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "x_axis": { + "dimension": { + "column_name": "posting_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "min": 0, + "reference_lines": [ + { + "aggregate": "average", + "axis": "y", + "dashed": true, + "id": "4e12c5fe", + "label": "12-month average", + "measure_name": "Sanctioned Amount" + } + ], + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_total_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Sanctioned Amount" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-approved-expenses-by-month", + "query": "expense-claims-approved-claims-12-months", + "sort_order": 5, + "title": "Sanctioned Amount by Month", + "workbook": "expense-claims" + }, + "expense-claims-awaiting-approval-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "decimals": 0, + "shorten": false + }, + { + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "id": "Awaiting Approval", + "measure_name": "Awaiting Approval" + }, + { + "aggregation": "sum", + "column_name": "base_total_claimed_amount", + "data_type": "Decimal", + "format": "currency", + "id": "Claimed", + "measure_name": "Claimed Amount" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-awaiting-approval-2", + "query": "expense-claims-awaiting-approval", + "sort_order": 2, + "title": "Awaiting Approval", + "workbook": "expense-claims" + }, + "expense-claims-outstanding-advances-2": { + "chart_type": "Table", + "config": { + "columns": [], + "conditional_formatting": { + "columns": [], + "formats": [ + { + "color": "red", + "column": { + "column_name": "Age (Days)", + "type": "column" + }, + "mode": "cell_rules", + "operator": ">", + "value": 60 + } + ] + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_formats": { + "Age (Days)": { + "decimals": 0, + "shorten": false + }, + "Claimed Amount": { + "decimals": 1, + "shorten": true + }, + "Paid Amount": { + "decimals": 1, + "shorten": true + }, + "Returned Amount": { + "decimals": 1, + "shorten": true + }, + "Unclaimed Amount": { + "decimals": 1, + "shorten": true + } + }, + "order_by": [ + { + "column": { + "column_name": "Unclaimed Amount", + "type": "column" + }, + "direction": "desc" + } + ], + "rows": [ + { + "column_name": "name", + "data_type": "String", + "dimension_name": "Advance" + }, + { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" + }, + { + "column_name": "purpose", + "data_type": "String", + "dimension_name": "Purpose" + } + ], + "values": [ + { + "aggregation": "min", + "column_name": "posting_date", + "data_type": "Date", + "measure_name": "Posting Date" + }, + { + "aggregation": "sum", + "column_name": "paid", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Paid Amount" + }, + { + "aggregation": "sum", + "column_name": "claimed", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Claimed Amount" + }, + { + "aggregation": "sum", + "column_name": "returned", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Returned Amount" + }, + { + "aggregation": "sum", + "column_name": "outstanding", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Unclaimed Amount" + }, + { + "aggregation": "max", + "column_name": "days_outstanding", + "data_type": "Integer", + "measure_name": "Age (Days)" + } + ] + }, + "folder": null, + "name": "expense-claims-outstanding-advances-2", + "query": "expense-claims-outstanding-advances", + "sort_order": 10, + "title": "Unclaimed Advances", + "workbook": "expense-claims" + }, + "expense-claims-owed-to-employees-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "decimals": 1, + "shorten": true + }, + { + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "aggregation": "sum", + "column_name": "outstanding", + "data_type": "Decimal", + "format": "currency", + "id": "Owed to Employees", + "measure_name": "Unpaid Amount" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(days_since_posting > 30, outstanding)", + "type": "expression" + }, + "format": "currency", + "id": "Older than 30 Days", + "measure_name": "Older than 30 Days" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-owed-to-employees-2", + "query": "expense-claims-owed-to-employees", + "sort_order": 3, + "title": "Unpaid Claims", + "workbook": "expense-claims" + }, + "expense-claims-unpaid-claims": { + "chart_type": "Table", + "config": { + "columns": [], + "conditional_formatting": { + "columns": [], + "formats": [ + { + "color": "red", + "column": { + "column_name": "Age (Days)", + "type": "column" + }, + "mode": "cell_rules", + "operator": ">", + "value": 30 + } + ] + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_formats": { + "Age (Days)": { + "decimals": 0, + "shorten": false + }, + "Outstanding Amount": { + "decimals": 1, + "shorten": true + }, + "Reimbursed Amount": { + "decimals": 1, + "shorten": true + }, + "Sanctioned Amount": { + "decimals": 1, + "shorten": true + } + }, + "order_by": [ + { + "column": { + "column_name": "Age (Days)", + "type": "column" + }, + "direction": "desc" + } + ], + "rows": [ + { + "column_name": "name", + "data_type": "String", + "dimension_name": "Claim" + }, + { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" + } + ], + "values": [ + { + "aggregation": "min", + "column_name": "posting_date", + "data_type": "Date", + "measure_name": "Posting Date" + }, + { + "aggregation": "sum", + "column_name": "base_total_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Sanctioned Amount" + }, + { + "aggregation": "sum", + "column_name": "reimbursed", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Reimbursed Amount" + }, + { + "aggregation": "sum", + "column_name": "outstanding", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Outstanding Amount" + }, + { + "aggregation": "max", + "column_name": "days_since_posting", + "data_type": "Integer", + "measure_name": "Age (Days)" + } + ] + }, + "folder": null, + "name": "expense-claims-unpaid-claims", + "query": "expense-claims-owed-to-employees", + "sort_order": 9, + "title": "Unpaid Claims", + "workbook": "expense-claims" + } + }, + "creation": "2026-09-26 21:12:25.946425", + "dashboards": { + "expense-claims": { + "items": [ + { + "default_operator": "=", + "default_user_key": "Company", + "filter_name": "Company", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-company", + "w": 4, + "x": 0, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 20, + "x": 0, + "y": 0 + } + }, + "links": { + "expense-claims-advances-outstanding": "`expense-claims-outstanding-advances`.`company`", + "expense-claims-advances-outstanding-by-employee": "`expense-claims-outstanding-advances`.`company`", + "expense-claims-approved-expenses": "`expense-claims-approved-claims`.`company`", + "expense-claims-approved-expenses-by-department": "`expense-claims-approved-claims-fiscal-year`.`company`", + "expense-claims-approved-expenses-by-expense-type": "`expense-claims-approved-claim-lines-fiscal-year`.`company`", + "expense-claims-approved-expenses-by-month": "`expense-claims-approved-claims-12-months`.`company`", + "expense-claims-awaiting-approval-2": "`expense-claims-awaiting-approval`.`company`", + "expense-claims-outstanding-advances-2": "`expense-claims-outstanding-advances`.`company`", + "expense-claims-owed-to-employees-2": "`expense-claims-owed-to-employees`.`company`", + "expense-claims-unpaid-claims": "`expense-claims-owed-to-employees`.`company`" + }, + "type": "filter" + }, + { + "filter_name": "Department", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-department", + "w": 4, + "x": 4, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 10, + "x": 0, + "y": 3 + } + }, + "links": { + "expense-claims-advances-outstanding": "`expense-claims-outstanding-advances`.`department`", + "expense-claims-advances-outstanding-by-employee": "`expense-claims-outstanding-advances`.`department`", + "expense-claims-approved-expenses": "`expense-claims-approved-claims`.`department`", + "expense-claims-approved-expenses-by-department": "`expense-claims-approved-claims-fiscal-year`.`department`", + "expense-claims-approved-expenses-by-expense-type": "`expense-claims-approved-claim-lines-fiscal-year`.`department`", + "expense-claims-approved-expenses-by-month": "`expense-claims-approved-claims-12-months`.`department`", + "expense-claims-awaiting-approval-2": "`expense-claims-awaiting-approval`.`department`", + "expense-claims-outstanding-advances-2": "`expense-claims-outstanding-advances`.`department`", + "expense-claims-owed-to-employees-2": "`expense-claims-owed-to-employees`.`department`", + "expense-claims-unpaid-claims": "`expense-claims-owed-to-employees`.`department`" + }, + "type": "filter" + }, + { + "chart": "expense-claims-approved-expenses", + "layout": { + "h": 5, + "i": "chart-3mjo2dkqoa", + "w": 5, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-awaiting-approval-2", + "layout": { + "h": 4, + "i": "chart-3mjnkeqk12", + "w": 5, + "x": 5, + "y": 3 + }, + "layouts": { + "sm": { + "h": 4, + "w": 10, + "x": 0, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-owed-to-employees-2", + "layout": { + "h": 4, + "i": "chart-3mjenff8uk", + "w": 5, + "x": 10, + "y": 3 + }, + "layouts": { + "sm": { + "h": 4, + "w": 10, + "x": 10, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-advances-outstanding", + "layout": { + "h": 4, + "i": "chart-3mj7faq4q7", + "w": 5, + "x": 15, + "y": 3 + }, + "layouts": { + "sm": { + "h": 4, + "w": 10, + "x": 0, + "y": 12 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-approved-expenses-by-month", + "layout": { + "h": 17, + "i": "chart-3mj46m4ue9", + "w": 10, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 17 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-approved-expenses-by-expense-type", + "layout": { + "h": 17, + "i": "chart-3mj4soms72", + "w": 10, + "x": 10, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 34 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-approved-expenses-by-department", + "layout": { + "h": 19, + "i": "chart-3mjdqrti83", + "w": 10, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 51 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-unpaid-claims", + "layout": { + "h": 19, + "i": "chart-3mjrbmah18", + "w": 10, + "x": 10, + "y": 25 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 70 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-advances-outstanding-by-employee", + "layout": { + "h": 19, + "i": "chart-3mj09g0ldv", + "w": 10, + "x": 0, + "y": 44 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 94 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-outstanding-advances-2", + "layout": { + "h": 19, + "i": "chart-3mjistpv6v", + "w": 10, + "x": 10, + "y": 44 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 113 + } + }, + "type": "chart" + } + ], + "name": "expense-claims", + "title": "Expense Claims", + "vertical_compact_layout": 1, + "visible_to_roles": [ + { + "role": "Expense Approver" + } + ], + "workbook": "expense-claims" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-28 12:09:41.857891", + "modified_by": "Administrator", + "module": "HR", + "name": "expense-claims", + "owner": "Administrator", + "queries": { + "expense-claims-approved-claim-lines-fiscal-year": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-approved-claim-lines-fiscal-year", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabExpense Claim Detail", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "join_condition": { + "left_column": { + "column_name": "parent", + "type": "column" + }, + "right_column": { + "column_name": "name", + "type": "column" + } + }, + "join_type": "inner", + "select_columns": [ + { + "column_name": "posting_date", + "type": "column" + }, + { + "column_name": "employee_name", + "type": "column" + }, + { + "column_name": "department", + "type": "column" + }, + { + "column_name": "company", + "type": "column" + }, + { + "column_name": "approval_status", + "type": "column" + } + ], + "table": { + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" + }, + "type": "join" + }, + { + "filters": [ + { + "expression": { + "expression": "approval_status == 'Approved'", + "type": "expression" + } + }, + { + "expression": { + "expression": "posting_date.between(fiscal_year_start(today()), today())", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "String", + "expression": { + "expression": "parent", + "type": "expression" + }, + "new_name": "expense_claim", + "type": "mutate" + }, + { + "column_names": [ + "expense_claim", + "expense_type", + "expense_date", + "employee_name", + "base_sanctioned_amount", + "department", + "company" + ], + "type": "select" + } + ], + "sort_order": 4, + "title": "Approved Claim Lines, Fiscal Year", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-approved-claims": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-approved-claims", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + }, + { + "expression": { + "expression": "approval_status == 'Approved'", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "name", + "posting_date", + "employee_name", + "department", + "company", + "base_total_claimed_amount", + "base_total_sanctioned_amount" + ], + "type": "select" + } + ], + "sort_order": 1, + "title": "Approved Claims", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-approved-claims-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-approved-claims-12-months", + "operations": [ + { + "table": { + "query_name": "expense-claims-approved-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "posting_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 2, + "title": "Approved Claims, 12 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-approved-claims-fiscal-year": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-approved-claims-fiscal-year", + "operations": [ + { + "table": { + "query_name": "expense-claims-approved-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "posting_date.between(fiscal_year_start(today()), today())", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 3, + "title": "Approved Claims, Fiscal Year", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-awaiting-approval": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-awaiting-approval", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 0 + }, + { + "column": { + "column_name": "approval_status", + "type": "column" + }, + "operator": "=", + "value": "Draft" + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(today(), posting_date, 'day')", + "type": "expression" + }, + "new_name": "days_waiting", + "type": "mutate" + }, + { + "column_names": [ + "name", + "posting_date", + "employee_name", + "expense_approver", + "base_total_claimed_amount", + "days_waiting", + "department", + "company" + ], + "type": "select" + } + ], + "sort_order": 5, + "title": "Awaiting Approval", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-outstanding-advances": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-outstanding-advances", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabEmployee Advance", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "paid_amount - claimed_amount - return_amount", + "type": "expression" + }, + "new_name": "unclaimed", + "type": "mutate" + }, + { + "filters": [ + { + "column": { + "column_name": "unclaimed", + "type": "column" + }, + "operator": ">", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "base_paid_amount / paid_amount", + "type": "expression" + }, + "new_name": "rate", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "base_paid_amount", + "type": "expression" + }, + "new_name": "paid", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "claimed_amount * rate", + "type": "expression" + }, + "new_name": "claimed", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "return_amount * rate", + "type": "expression" + }, + "new_name": "returned", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "unclaimed * rate", + "type": "expression" + }, + "new_name": "outstanding", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(today(), posting_date, 'day')", + "type": "expression" + }, + "new_name": "days_outstanding", + "type": "mutate" + }, + { + "column_names": [ + "name", + "posting_date", + "employee_name", + "purpose", + "paid", + "claimed", + "returned", + "outstanding", + "days_outstanding", + "department", + "company" + ], + "type": "select" + } + ], + "sort_order": 7, + "title": "Outstanding Advances", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-owed-to-employees": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-owed-to-employees", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + }, + { + "column": { + "column_name": "total_sanctioned_amount", + "type": "column" + }, + "operator": ">", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "total_amount_reimbursed * exchange_rate", + "type": "expression" + }, + "new_name": "reimbursed", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "(grand_total - total_amount_reimbursed) * exchange_rate", + "type": "expression" + }, + "new_name": "outstanding", + "type": "mutate" + }, + { + "filters": [ + { + "column": { + "column_name": "outstanding", + "type": "column" + }, + "operator": "!=", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(today(), posting_date, 'day')", + "type": "expression" + }, + "new_name": "days_since_posting", + "type": "mutate" + }, + { + "column_names": [ + "name", + "posting_date", + "employee_name", + "base_total_sanctioned_amount", + "reimbursed", + "outstanding", + "days_since_posting", + "department", + "company" + ], + "type": "select" + } + ], + "sort_order": 6, + "title": "Owed to Employees", + "use_live_connection": 1, + "workbook": "expense-claims" + } + }, + "title": "Expense Claims" +} diff --git a/hrms/hr_setup/insights_workbook/human_resource/human_resource.json b/hrms/hr_setup/insights_workbook/human_resource/human_resource.json new file mode 100644 index 00000000000..89e34ce8ac1 --- /dev/null +++ b/hrms/hr_setup/insights_workbook/human_resource/human_resource.json @@ -0,0 +1,1281 @@ +{ + "charts": { + "human-resource-exits-2": { + "chart_type": "Number", + "config": { + "date_column": { + "column_name": "relieving_date", + "data_type": "Date", + "dimension_name": "relieving_date" + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "show": "delta", + "source": "last year" + }, + "decimals": 0, + "negative_is_better": true, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "id": "Exits", + "measure_name": "Employee Exits (This FY)" + } + ], + "order_by": [], + "sparkline": false, + "window": { + "span": "fiscal year to date" + } + }, + "folder": null, + "name": "human-resource-exits-2", + "query": "human-resource-exits", + "sort_order": 3, + "title": "Employee Exits", + "workbook": "human-resource" + }, + "human-resource-exits-by-department": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 0, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Exits", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "department_name", + "data_type": "String", + "dimension_name": "Department" + } + }, + "y_axis": { + "axis_label": "Employees", + "reference_lines": [ + { + "aggregate": "average", + "axis": "y", + "dashed": true, + "id": "6e91f7c1", + "label": "Average", + "measure_name": "Exits" + } + ], + "series": [ + { + "measure": { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "measure_name": "Exits" + }, + "type": "bar" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "human-resource-exits-by-department", + "query": "human-resource-exits-fiscal-year-to-date", + "sort_order": 7, + "title": "Exits by Department (This FY)", + "workbook": "human-resource" + }, + "human-resource-headcount-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "since FY start", + "measure": { + "data_type": "Integer", + "expression": { + "expression": "count_if(is_not_in(status, 'Inactive', 'Suspended') & (date_of_joining <= fiscal_year_start(today())) & (is_not_set(relieving_date) | (relieving_date >= fiscal_year_start(today()))), name)", + "type": "expression" + }, + "measure_name": "At Fiscal Year Start" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "data_type": "Integer", + "expression": { + "expression": "count_if(is_not_in(status, 'Inactive', 'Suspended') & (date_of_joining <= today()) & (is_not_set(relieving_date) | (relieving_date >= today())), name)", + "type": "expression" + }, + "id": "Headcount", + "measure_name": "Active Employees" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "human-resource-headcount-2", + "query": "human-resource-headcount", + "sort_order": 1, + "title": "Active Employees", + "workbook": "human-resource" + }, + "human-resource-headcount-joins-exits-by-month": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 0, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "x_axis": { + "dimension": { + "column_name": "period", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "axis_label": "Employees", + "series": [ + { + "measure": { + "data_type": "Integer", + "expression": { + "expression": "sum(joined)", + "type": "expression" + }, + "measure_name": "New Hires" + }, + "type": "bar" + }, + { + "measure": { + "data_type": "Integer", + "expression": { + "expression": "0 - sum(left)", + "type": "expression" + }, + "measure_name": "Exits" + }, + "type": "bar" + }, + { + "align": "Right", + "measure": { + "data_type": "Integer", + "expression": { + "expression": "sum(employed)", + "type": "expression" + }, + "measure_name": "Active Employees" + }, + "show_data_points": true, + "type": "line" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "human-resource-headcount-joins-exits-by-month", + "query": "human-resource-workforce-by-month", + "sort_order": 4, + "title": "Active Employees, New Hires and Exits by Month", + "workbook": "human-resource" + }, + "human-resource-joiners-leavers": { + "chart_type": "Table", + "config": { + "columns": [], + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 12, + "order_by": [ + { + "column": { + "column_name": "Date", + "type": "column" + }, + "direction": "desc" + } + ], + "rows": [ + { + "column_name": "name", + "data_type": "String", + "dimension_name": "Employee" + }, + { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Name" + }, + { + "column_name": "department_name", + "data_type": "String", + "dimension_name": "Department" + }, + { + "column_name": "designation", + "data_type": "String", + "dimension_name": "Designation" + }, + { + "column_name": "movement", + "data_type": "String", + "dimension_name": "Type" + }, + { + "column_name": "moved_on", + "data_type": "Date", + "dimension_name": "Date" + } + ], + "values": [] + }, + "folder": null, + "name": "human-resource-joiners-leavers", + "query": "human-resource-joiners-leavers-fiscal-year-to-date", + "sort_order": 8, + "title": "New Hires and Exits (This FY)", + "workbook": "human-resource" + }, + "human-resource-joins-2": { + "chart_type": "Number", + "config": { + "date_column": { + "column_name": "date_of_joining", + "data_type": "Date", + "dimension_name": "date_of_joining" + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "show": "delta", + "source": "last year" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "id": "Joins", + "measure_name": "New Hires (This FY)" + } + ], + "order_by": [], + "sparkline": false, + "window": { + "span": "fiscal year to date" + } + }, + "folder": null, + "name": "human-resource-joins-2", + "query": "human-resource-joins", + "sort_order": 2, + "title": "New Hires", + "workbook": "human-resource" + }, + "human-resource-workforce-by-department": { + "chart_type": "Donut", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "label_column": { + "column_name": "department_name", + "data_type": "String", + "dimension_name": "Department" + }, + "legend_position": "right", + "limit": 100, + "max_slices": 6, + "number_format": { + "decimals": 0, + "shorten": false + }, + "order_by": [], + "show_inline_labels": true, + "value_column": { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "measure_name": "Employees" + } + }, + "folder": null, + "name": "human-resource-workforce-by-department", + "query": "human-resource-employed-today", + "sort_order": 5, + "title": "Employees by Department", + "workbook": "human-resource" + }, + "human-resource-workforce-by-designation": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_format": { + "decimals": 0, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Employees", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "designation", + "data_type": "String", + "dimension_name": "Designation" + } + }, + "y_axis": { + "axis_label": "Employees", + "series": [ + { + "measure": { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "measure_name": "Employees" + }, + "type": "bar" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "human-resource-workforce-by-designation", + "query": "human-resource-employed-today", + "sort_order": 6, + "title": "Employees by Designation", + "workbook": "human-resource" + } + }, + "creation": "2026-09-26 21:12:23.241919", + "dashboards": { + "human-resource": { + "items": [ + { + "default_operator": "=", + "default_user_key": "Company", + "filter_name": "Company", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-company", + "w": 4, + "x": 0, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 20, + "x": 0, + "y": 0 + } + }, + "links": { + "human-resource-exits-2": "`human-resource-employee-roster`.`company`", + "human-resource-exits-by-department": "`human-resource-employee-roster`.`company`", + "human-resource-headcount-2": "`human-resource-employee-roster`.`company`", + "human-resource-headcount-joins-exits-by-month": "`human-resource-employee-roster`.`company`", + "human-resource-joiners-leavers": "`human-resource-employee-roster`.`company`", + "human-resource-joins-2": "`human-resource-employee-roster`.`company`", + "human-resource-workforce-by-department": "`human-resource-employee-roster`.`company`", + "human-resource-workforce-by-designation": "`human-resource-employee-roster`.`company`" + }, + "type": "filter" + }, + { + "chart": "human-resource-headcount-2", + "layout": { + "h": 5, + "i": "chart-3lok5svton", + "w": 7, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-joins-2", + "layout": { + "h": 5, + "i": "chart-3lob2qt82i", + "w": 7, + "x": 7, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-exits-2", + "layout": { + "h": 5, + "i": "chart-3los9v4g3l", + "w": 6, + "x": 14, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 20, + "x": 0, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-headcount-joins-exits-by-month", + "layout": { + "h": 17, + "i": "chart-3lot1g7ob4", + "w": 20, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 13 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-workforce-by-department", + "layout": { + "h": 17, + "i": "chart-3lohaf3sm3", + "w": 10, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 30 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-workforce-by-designation", + "layout": { + "h": 17, + "i": "chart-3lo3v42nsa", + "w": 10, + "x": 10, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 47 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-exits-by-department", + "layout": { + "h": 17, + "i": "chart-3loq60ta3p", + "w": 10, + "x": 0, + "y": 42 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 66 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-joiners-leavers", + "layout": { + "h": 17, + "i": "chart-3loo2p20p5", + "w": 10, + "x": 10, + "y": 42 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 83 + } + }, + "type": "chart" + } + ], + "name": "human-resource", + "title": "Human Resource", + "vertical_compact_layout": 1, + "visible_to_roles": [ + { + "role": "HR User" + }, + { + "role": "HR Manager" + } + ], + "workbook": "human-resource" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-28 12:09:41.771119", + "modified_by": "Administrator", + "module": "HR Setup", + "name": "human-resource", + "owner": "Administrator", + "queries": { + "human-resource-employed-today": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-employed-today", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "is_not_in(status, 'Inactive', 'Suspended') & (date_of_joining <= today()) & (is_not_set(relieving_date) | (relieving_date >= today()))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "date_of_joining" + ], + "type": "select" + } + ], + "sort_order": 3, + "title": "Employed Today", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-employee-roster": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-employee-roster", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabEmployee", + "type": "table" + }, + "type": "source" + }, + { + "join_condition": { + "left_column": { + "column_name": "department", + "type": "column" + }, + "right_column": { + "column_name": "name", + "type": "column" + } + }, + "join_type": "left", + "select_columns": [ + { + "column_name": "department_name", + "type": "column" + } + ], + "table": { + "data_source": "Site DB", + "table_name": "tabDepartment", + "type": "table" + }, + "type": "join" + }, + { + "data_type": "String", + "expression": { + "expression": "if_null(department_name, 'Not Set')", + "type": "expression" + }, + "new_name": "department_name", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "ibis.literal(1)", + "type": "expression" + }, + "new_name": "one_person", + "type": "mutate" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "date_of_joining", + "relieving_date", + "company", + "status", + "one_person" + ], + "type": "select" + } + ], + "sort_order": 1, + "title": "Employee Roster", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-exits": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-exits", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "is_set(relieving_date)", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "date_of_joining", + "relieving_date" + ], + "type": "select" + } + ], + "sort_order": 5, + "title": "Exits", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-exits-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-exits-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "human-resource-exits", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "relieving_date.between(fiscal_year_start(today()), today())", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 7, + "title": "Exits, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-headcount": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-headcount", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "date_of_joining", + "status", + "relieving_date" + ], + "type": "select" + } + ], + "sort_order": 2, + "title": "Headcount", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-joiners-leavers-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-joiners-leavers-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "human-resource-exits-fiscal-year-to-date", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "data_type": "String", + "expression": { + "expression": "ibis.literal('Left')", + "type": "expression" + }, + "new_name": "movement", + "type": "mutate" + }, + { + "data_type": "Date", + "expression": { + "expression": "relieving_date", + "type": "expression" + }, + "new_name": "moved_on", + "type": "mutate" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "movement", + "moved_on" + ], + "type": "select" + }, + { + "distinct": false, + "table": { + "query_name": "human-resource-joins-as-movements", + "type": "query", + "workbook": "human-resource" + }, + "type": "union" + }, + { + "column": { + "column_name": "moved_on", + "type": "column" + }, + "direction": "desc", + "type": "order_by" + } + ], + "sort_order": 11, + "title": "Joiners & Leavers, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-joins": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-joins", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "date_of_joining" + ], + "type": "select" + } + ], + "sort_order": 4, + "title": "Joins", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-joins-as-movements": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-joins-as-movements", + "operations": [ + { + "table": { + "query_name": "human-resource-joins-fiscal-year-to-date", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "data_type": "String", + "expression": { + "expression": "ibis.literal('Joined')", + "type": "expression" + }, + "new_name": "movement", + "type": "mutate" + }, + { + "data_type": "Date", + "expression": { + "expression": "date_of_joining", + "type": "expression" + }, + "new_name": "moved_on", + "type": "mutate" + }, + { + "column_names": [ + "name", + "employee_name", + "department_name", + "designation", + "movement", + "moved_on" + ], + "type": "select" + } + ], + "sort_order": 10, + "title": "Joins as Movements", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-joins-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-joins-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "human-resource-joins", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "date_of_joining.between(fiscal_year_start(today()), today())", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 6, + "title": "Joins, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-month-spine": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-month-spine", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabEmployee", + "type": "table" + }, + "type": "source" + }, + { + "column_names": [ + "name" + ], + "type": "select" + }, + { + "data_type": "Integer", + "expression": { + "expression": "row_number()", + "type": "expression" + }, + "new_name": "months_back", + "type": "mutate" + }, + { + "filters": [ + { + "column": { + "column_name": "months_back", + "type": "column" + }, + "operator": ">=", + "value": 1 + }, + { + "column": { + "column_name": "months_back", + "type": "column" + }, + "operator": "<=", + "value": 12 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Date", + "expression": { + "expression": "month_start(today()) - months_back.as_interval('M')", + "type": "expression" + }, + "new_name": "period", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "ibis.literal(1)", + "type": "expression" + }, + "new_name": "one_person", + "type": "mutate" + }, + { + "column_names": [ + "period", + "one_person" + ], + "type": "select" + } + ], + "sort_order": 8, + "title": "Month Spine", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-workforce-by-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-workforce-by-month", + "operations": [ + { + "table": { + "query_name": "human-resource-month-spine", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "join_condition": { + "left_column": { + "column_name": "one_person", + "type": "column" + }, + "right_column": { + "column_name": "one_person", + "type": "column" + } + }, + "join_type": "inner", + "select_columns": [ + { + "column_name": "name", + "type": "column" + }, + { + "column_name": "employee_name", + "type": "column" + }, + { + "column_name": "department_name", + "type": "column" + }, + { + "column_name": "designation", + "type": "column" + }, + { + "column_name": "date_of_joining", + "type": "column" + }, + { + "column_name": "relieving_date", + "type": "column" + }, + { + "column_name": "status", + "type": "column" + } + ], + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "join" + }, + { + "data_type": "Date", + "expression": { + "expression": "date_sub(date_add(period, 1, 'month'), 1, 'day')", + "type": "expression" + }, + "new_name": "month_end", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "one_if(month_start(date_of_joining) == period)", + "type": "expression" + }, + "new_name": "joined", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "one_if(month_start(relieving_date) == period)", + "type": "expression" + }, + "new_name": "left", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "one_if(is_not_in(status, 'Inactive', 'Suspended') & (date_of_joining <= month_end) & (is_not_set(relieving_date) | (relieving_date >= month_end)))", + "type": "expression" + }, + "new_name": "employed", + "type": "mutate" + }, + { + "filters": [ + { + "expression": { + "expression": "(joined + left + employed) > 0", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "period", + "name", + "employee_name", + "department_name", + "designation", + "date_of_joining", + "relieving_date", + "joined", + "left", + "employed" + ], + "type": "select" + }, + { + "column": { + "column_name": "period", + "type": "column" + }, + "direction": "asc", + "type": "order_by" + } + ], + "sort_order": 9, + "title": "Workforce by Month", + "use_live_connection": 1, + "workbook": "human-resource" + } + }, + "title": "Human Resource" +} diff --git a/hrms/payroll/insights_workbook/payroll/payroll.json b/hrms/payroll/insights_workbook/payroll/payroll.json new file mode 100644 index 00000000000..80a8ca10efc --- /dev/null +++ b/hrms/payroll/insights_workbook/payroll/payroll.json @@ -0,0 +1,1529 @@ +{ + "charts": { + "payroll-average-monthly-gross-per-employee": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "measure": { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), base_gross_pay) / distinct_count_if(start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), concat(employee, format_date(start_date, '%Y-%m')))", + "type": "expression" + }, + "format": "currency", + "measure_name": "Same Months Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day')), base_gross_pay) / distinct_count_if(start_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day')), concat(employee, format_date(start_date, '%Y-%m')))", + "type": "expression" + }, + "format": "currency", + "id": "Average Monthly Gross per Employee", + "measure_name": "Average Gross Pay (This FY)" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-average-monthly-gross-per-employee", + "query": "payroll-average-monthly-gross-fiscal-year-to-date", + "sort_order": 4, + "title": "Average Gross Pay", + "workbook": "payroll" + }, + "payroll-deductions-by-component": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "split_by": { + "dimension": { + "column_name": "salary_component", + "data_type": "String", + "dimension_name": "Component" + }, + "max_split_values": 5 + }, + "x_axis": { + "dimension": { + "column_name": "start_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "min": 0, + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Deductions" + }, + "type": "bar" + } + ], + "stack": true + } + }, + "folder": null, + "name": "payroll-deductions-by-component", + "query": "payroll-deductions-by-component-12-months", + "sort_order": 9, + "title": "Deductions by Component", + "workbook": "payroll" + }, + "payroll-earnings-by-component": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "split_by": { + "dimension": { + "column_name": "salary_component", + "data_type": "String", + "dimension_name": "Component" + }, + "max_split_values": 5 + }, + "x_axis": { + "dimension": { + "column_name": "start_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "min": 0, + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Earnings" + }, + "type": "bar" + } + ], + "stack": true + } + }, + "folder": null, + "name": "payroll-earnings-by-component", + "query": "payroll-earnings-by-component-12-months", + "sort_order": 8, + "title": "Earnings by Component", + "workbook": "payroll" + }, + "payroll-employees-paid": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last year", + "measure": { + "data_type": "Integer", + "expression": { + "expression": "distinct_count_if(start_date.between(date_sub(date_sub(month_start(today()), 1, 'month'), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), employee)", + "type": "expression" + }, + "measure_name": "Same Month Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "data_type": "Integer", + "expression": { + "expression": "distinct_count_if(start_date.between(date_sub(month_start(today()), 1, 'month'), date_sub(month_start(today()), 1, 'day')), employee)", + "type": "expression" + }, + "id": "Employees Paid, Last Month", + "measure_name": "Employees Paid (Last Month)" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-employees-paid", + "query": "payroll-employees-paid-last-month", + "sort_order": 3, + "title": "Employees Paid", + "workbook": "payroll" + }, + "payroll-employees-paid-by-month": { + "chart_type": "Line", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 0, + "shorten": false + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "x_axis": { + "dimension": { + "column_name": "start_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "min": 0, + "series": [ + { + "measure": { + "aggregation": "count_distinct", + "column_name": "employee", + "data_type": "Integer", + "measure_name": "Employees Paid" + }, + "show_data_points": true, + "type": "line" + } + ] + } + }, + "folder": null, + "name": "payroll-employees-paid-by-month", + "query": "payroll-employees-paid-12-months", + "sort_order": 6, + "title": "Employees Paid by Month", + "workbook": "payroll" + }, + "payroll-gross-and-net-pay-by-month": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "x_axis": { + "dimension": { + "column_name": "start_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "min": 0, + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_net_pay", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Net Pay" + }, + "type": "bar" + }, + { + "measure": { + "aggregation": "sum", + "column_name": "deductions", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Total Deduction" + }, + "type": "bar" + } + ], + "stack": true + } + }, + "folder": null, + "name": "payroll-gross-and-net-pay-by-month", + "query": "payroll-gross-and-net-pay-12-months", + "sort_order": 5, + "title": "Net Pay and Deductions by Month", + "workbook": "payroll" + }, + "payroll-gross-pay": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "measure": { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), base_gross_pay)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Same Months Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day')), base_gross_pay)", + "type": "expression" + }, + "format": "currency", + "id": "Gross Pay", + "measure_name": "Gross Pay (This FY)" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-gross-pay", + "query": "payroll-gross-pay-fiscal-year-to-date", + "sort_order": 1, + "title": "Gross Pay", + "workbook": "payroll" + }, + "payroll-gross-pay-by-department": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Gross Pay", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "department", + "data_type": "String", + "dimension_name": "Department" + } + }, + "y_axis": { + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_gross_pay", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Gross Pay" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "payroll-gross-pay-by-department", + "query": "payroll-gross-pay-by-department-fiscal-year-to-date", + "sort_order": 7, + "title": "Gross Pay by Department (This FY)", + "workbook": "payroll" + }, + "payroll-net-pay": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last FY", + "measure": { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year')), base_net_pay)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Same Months Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day')), base_net_pay)", + "type": "expression" + }, + "format": "currency", + "id": "Net Pay", + "measure_name": "Net Pay (This FY)" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-net-pay", + "query": "payroll-net-pay-fiscal-year-to-date", + "sort_order": 2, + "title": "Net Pay", + "workbook": "payroll" + } + }, + "creation": "2026-09-26 21:12:27.750621", + "dashboards": { + "payroll": { + "items": [ + { + "default_operator": "=", + "default_user_key": "Company", + "filter_name": "Company", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-company", + "w": 4, + "x": 0, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 20, + "x": 0, + "y": 0 + } + }, + "links": { + "payroll-average-monthly-gross-per-employee": "`payroll-salary-slips`.`company`", + "payroll-deductions-by-component": "`payroll-salary-slip-deductions`.`company`", + "payroll-earnings-by-component": "`payroll-salary-slip-earnings`.`company`", + "payroll-employees-paid": "`payroll-salary-slips`.`company`", + "payroll-employees-paid-by-month": "`payroll-salary-slips`.`company`", + "payroll-gross-and-net-pay-by-month": "`payroll-salary-slips`.`company`", + "payroll-gross-pay": "`payroll-salary-slips`.`company`", + "payroll-gross-pay-by-department": "`payroll-salary-slips`.`company`", + "payroll-net-pay": "`payroll-salary-slips`.`company`" + }, + "type": "filter" + }, + { + "chart": "payroll-gross-pay", + "layout": { + "h": 5, + "i": "chart-3n5kun9ms9", + "w": 5, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "payroll-net-pay", + "layout": { + "h": 5, + "i": "chart-3n5ph4hs93", + "w": 5, + "x": 5, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "payroll-employees-paid", + "layout": { + "h": 5, + "i": "chart-3n5550iea7", + "w": 5, + "x": 10, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "payroll-average-monthly-gross-per-employee", + "layout": { + "h": 5, + "i": "chart-3n5ce1r8ka", + "w": 5, + "x": 15, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "payroll-gross-and-net-pay-by-month", + "layout": { + "h": 17, + "i": "chart-3n5gdgk0b3", + "w": 10, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 13 + } + }, + "type": "chart" + }, + { + "chart": "payroll-employees-paid-by-month", + "layout": { + "h": 17, + "i": "chart-3n5fcmrtb9", + "w": 10, + "x": 10, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 30 + } + }, + "type": "chart" + }, + { + "chart": "payroll-gross-pay-by-department", + "layout": { + "h": 19, + "i": "chart-3n5fqiqgb3", + "w": 10, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 47 + } + }, + "type": "chart" + }, + { + "chart": "payroll-earnings-by-component", + "layout": { + "h": 19, + "i": "chart-3n506a8pbu", + "w": 10, + "x": 10, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 66 + } + }, + "type": "chart" + }, + { + "chart": "payroll-deductions-by-component", + "layout": { + "h": 19, + "i": "chart-3n5cq3gl4n", + "w": 20, + "x": 0, + "y": 44 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 85 + } + }, + "type": "chart" + } + ], + "name": "payroll", + "title": "Payroll", + "vertical_compact_layout": 1, + "visible_to_roles": [ + { + "role": "HR User" + }, + { + "role": "HR Manager" + } + ], + "workbook": "payroll" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-28 12:56:29.244088", + "modified_by": "Administrator", + "module": "Payroll", + "name": "payroll", + "owner": "Administrator", + "queries": { + "payroll-average-monthly-gross-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-average-monthly-gross-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee", + "employee_name", + "department", + "start_date", + "base_gross_pay" + ], + "type": "select" + } + ], + "sort_order": 8, + "title": "Average Monthly Gross, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-deductions-by-component-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-deductions-by-component-12-months", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slip-deductions", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "start_date", + "salary_component", + "base_amount" + ], + "type": "select" + } + ], + "sort_order": 13, + "title": "Deductions by Component, 12 Months", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-earnings-by-component-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-earnings-by-component-12-months", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slip-earnings", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "start_date", + "salary_component", + "base_amount" + ], + "type": "select" + } + ], + "sort_order": 12, + "title": "Earnings by Component, 12 Months", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-employees-paid-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-employees-paid-12-months", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "employee", + "employee_name", + "department", + "designation", + "start_date" + ], + "type": "select" + } + ], + "sort_order": 10, + "title": "Employees Paid, 12 Months", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-employees-paid-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-employees-paid-last-month", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(date_sub(month_start(today()), 1, 'month'), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "employee", + "employee_name", + "department", + "designation", + "start_date" + ], + "type": "select" + } + ], + "sort_order": 7, + "title": "Employees Paid, Last Month", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-gross-and-net-pay-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-gross-and-net-pay-12-months", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "department", + "start_date", + "base_gross_pay", + "base_net_pay", + "deductions" + ], + "type": "select" + } + ], + "sort_order": 9, + "title": "Gross and Net Pay, 12 Months", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-gross-pay-by-department-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-gross-pay-by-department-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "department", + "start_date", + "base_gross_pay" + ], + "type": "select" + } + ], + "sort_order": 11, + "title": "Gross Pay by Department, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-gross-pay-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-gross-pay-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "department", + "start_date", + "base_gross_pay" + ], + "type": "select" + } + ], + "sort_order": 5, + "title": "Gross Pay, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-loan-repayments": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-loan-repayments", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Slip", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "String", + "expression": { + "expression": "name", + "type": "expression" + }, + "new_name": "salary_slip", + "type": "mutate" + }, + { + "data_type": "String", + "expression": { + "expression": "literal('Loan Repayment')", + "type": "expression" + }, + "new_name": "salary_component", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "(gross_pay - net_pay - total_deduction) * exchange_rate", + "type": "expression" + }, + "new_name": "base_amount", + "type": "mutate" + }, + { + "filters": [ + { + "column": { + "column_name": "base_amount", + "type": "column" + }, + "operator": "!=", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "company", + "start_date", + "salary_component", + "base_amount" + ], + "type": "select" + } + ], + "sort_order": 3, + "title": "Loan Repayments", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-net-pay-fiscal-year-to-date": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-net-pay-fiscal-year-to-date", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(fiscal_year_start(date_sub(month_start(today()), 1, 'day')), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "department", + "start_date", + "base_net_pay" + ], + "type": "select" + } + ], + "sort_order": 6, + "title": "Net Pay, Fiscal Year to Date", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-salary-slip-deductions": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-salary-slip-deductions", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Detail", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + }, + { + "column": { + "column_name": "parenttype", + "type": "column" + }, + "operator": "=", + "value": "Salary Slip" + }, + { + "column": { + "column_name": "parentfield", + "type": "column" + }, + "operator": "=", + "value": "deductions" + }, + { + "column": { + "column_name": "do_not_include_in_total", + "type": "column" + }, + "operator": "=", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "join_condition": { + "left_column": { + "column_name": "parent", + "type": "column" + }, + "right_column": { + "column_name": "name", + "type": "column" + } + }, + "join_type": "inner", + "select_columns": [ + { + "column_name": "start_date", + "type": "column" + }, + { + "column_name": "employee_name", + "type": "column" + }, + { + "column_name": "company", + "type": "column" + }, + { + "column_name": "exchange_rate", + "type": "column" + } + ], + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Slip", + "type": "table" + }, + "type": "join" + }, + { + "data_type": "String", + "expression": { + "expression": "parent", + "type": "expression" + }, + "new_name": "salary_slip", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "amount * exchange_rate", + "type": "expression" + }, + "new_name": "base_amount", + "type": "mutate" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "company", + "start_date", + "salary_component", + "base_amount" + ], + "type": "select" + }, + { + "distinct": false, + "table": { + "query_name": "payroll-loan-repayments", + "type": "query", + "workbook": "payroll" + }, + "type": "union" + } + ], + "sort_order": 4, + "title": "Salary Slip Deductions", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-salary-slip-earnings": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-salary-slip-earnings", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Detail", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + }, + { + "column": { + "column_name": "parenttype", + "type": "column" + }, + "operator": "=", + "value": "Salary Slip" + }, + { + "column": { + "column_name": "parentfield", + "type": "column" + }, + "operator": "=", + "value": "earnings" + }, + { + "column": { + "column_name": "do_not_include_in_total", + "type": "column" + }, + "operator": "=", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "join_condition": { + "left_column": { + "column_name": "parent", + "type": "column" + }, + "right_column": { + "column_name": "name", + "type": "column" + } + }, + "join_type": "inner", + "select_columns": [ + { + "column_name": "start_date", + "type": "column" + }, + { + "column_name": "employee_name", + "type": "column" + }, + { + "column_name": "company", + "type": "column" + }, + { + "column_name": "exchange_rate", + "type": "column" + } + ], + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Slip", + "type": "table" + }, + "type": "join" + }, + { + "data_type": "String", + "expression": { + "expression": "parent", + "type": "expression" + }, + "new_name": "salary_slip", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "amount * exchange_rate", + "type": "expression" + }, + "new_name": "base_amount", + "type": "mutate" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "company", + "start_date", + "salary_component", + "base_amount" + ], + "type": "select" + } + ], + "sort_order": 2, + "title": "Salary Slip Earnings", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-salary-slips": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-salary-slips", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Slip", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "String", + "expression": { + "expression": "name", + "type": "expression" + }, + "new_name": "salary_slip", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "base_gross_pay - base_net_pay", + "type": "expression" + }, + "new_name": "deductions", + "type": "mutate" + }, + { + "column_names": [ + "salary_slip", + "employee", + "employee_name", + "department", + "designation", + "company", + "start_date", + "base_gross_pay", + "base_net_pay", + "deductions" + ], + "type": "select" + } + ], + "sort_order": 1, + "title": "Salary Slips", + "use_live_connection": 1, + "workbook": "payroll" + } + }, + "title": "Payroll" +} diff --git a/hrms/payroll/payroll_dashboard/payroll/payroll.json b/hrms/payroll/payroll_dashboard/payroll/payroll.json index 47e567e6c8b..53d1534e4b1 100644 --- a/hrms/payroll/payroll_dashboard/payroll/payroll.json +++ b/hrms/payroll/payroll_dashboard/payroll/payroll.json @@ -32,9 +32,10 @@ "docstatus": 0, "doctype": "Dashboard", "idx": 0, + "insights_dashboard": "payroll", "is_default": 1, "is_standard": 1, - "modified": "2022-08-22 14:21:33.653983", + "modified": "2026-09-28 13:54:24.991563", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll",