From 9218b40c2c7b1036b953c73400d2182e96911c69 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Sat, 19 Sep 2026 19:08:47 +0530 Subject: [PATCH 1/8] feat: ship the standard Insights dashboards --- .../expense_claims/expense_claims.json | 1539 ++++++++++++++++ .../human_resource/human_resource.json | 1565 +++++++++++++++++ .../insights_workbook/payroll/payroll.json | 1388 +++++++++++++++ 3 files changed, 4492 insertions(+) create mode 100644 hrms/hr/insights_workbook/expense_claims/expense_claims.json create mode 100644 hrms/hr/insights_workbook/human_resource/human_resource.json create mode 100644 hrms/payroll/insights_workbook/payroll/payroll.json 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..7e511d87e2c --- /dev/null +++ b/hrms/hr/insights_workbook/expense_claims/expense_claims.json @@ -0,0 +1,1539 @@ +{ + "charts": { + "expense-claims-advances-by-status": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Advance Value", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "status", + "data_type": "String", + "dimension_name": "Status" + } + }, + "y_axis": { + "min": 0, + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "advance_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Advance Value" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-advances-by-status", + "query": "expense-claims-employee-advances", + "sort_order": 10, + "title": "Advances by Status", + "workbook": "expense-claims" + }, + "expense-claims-claims-filed": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs prior 3 months", + "measure": { + "aggregation": "max", + "column_name": "claims_filed_prior", + "data_type": "Integer", + "measure_name": "Prior 3 Months" + }, + "show": "change", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "claims_filed", + "data_type": "Integer", + "id": "Claims Filed, 3 Months", + "measure_name": "Claims Filed, 3 Months" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-claims-filed", + "query": "expense-claims-claims-filed-3-months", + "sort_order": 2, + "title": "Claims Filed", + "workbook": "expense-claims" + }, + "expense-claims-days-to-reimburse": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs prior 3 months", + "measure": { + "aggregation": "max", + "column_name": "days_to_reimburse_prior", + "data_type": "Decimal", + "measure_name": "Prior 3 Months" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 1, + "shorten": false, + "suffix": " days" + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "days_to_reimburse", + "data_type": "Decimal", + "id": "Days to Reimburse", + "measure_name": "Days to Reimburse" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-days-to-reimburse", + "query": "expense-claims-days-to-reimburse-3-months", + "sort_order": 4, + "title": "Days to Reimburse", + "workbook": "expense-claims" + }, + "expense-claims-outstanding-advances-2": { + "chart_type": "Table", + "config": { + "columns": [], + "conditional_formatting": { + "columns": [], + "formats": [ + { + "color": "red", + "column": { + "column_name": "Days Outstanding", + "type": "column" + }, + "mode": "cell_rules", + "operator": ">", + "value": 60 + } + ] + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_formats": { + "Advanced": { + "decimals": 1, + "shorten": true + }, + "Unclaimed": { + "decimals": 1, + "shorten": true + } + }, + "order_by": [ + { + "column": { + "column_name": "Unclaimed", + "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": "department", + "data_type": "String", + "dimension_name": "Department" + } + ], + "values": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum(unclaimed_amount)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Unclaimed" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum(paid_amount)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Advanced" + }, + { + "aggregation": "max", + "column_name": "days_outstanding", + "data_type": "Integer", + "measure_name": "Days Outstanding" + } + ] + }, + "folder": null, + "name": "expense-claims-outstanding-advances-2", + "query": "expense-claims-outstanding-advances", + "sort_order": 11, + "title": "Outstanding Advances", + "workbook": "expense-claims" + }, + "expense-claims-reimbursement-turnaround": { + "chart_type": "Line", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_format": { + "decimals": 1, + "shorten": false, + "suffix": " days" + }, + "order_by": [ + { + "column": { + "column_name": "Month", + "type": "column" + }, + "direction": "asc" + } + ], + "x_axis": { + "dimension": { + "column_name": "clearance_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" + } + }, + "y_axis": { + "min": 0, + "series": [ + { + "measure": { + "aggregation": "avg", + "column_name": "days_to_reimburse", + "data_type": "Decimal", + "measure_name": "Days to Reimburse" + }, + "show_data_points": true, + "smooth": true, + "type": "line" + } + ] + } + }, + "folder": null, + "name": "expense-claims-reimbursement-turnaround", + "query": "expense-claims-reimbursed-12-months", + "sort_order": 6, + "title": "Reimbursement Turnaround", + "workbook": "expense-claims" + }, + "expense-claims-rejection-rate": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs prior 3 months", + "measure": { + "aggregation": "max", + "column_name": "rejection_rate_prior", + "data_type": "Decimal", + "format": "percent", + "measure_name": "Prior 3 Months" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 1, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "rejection_rate", + "data_type": "Decimal", + "format": "percent", + "id": "Rejection Rate, 3 Months", + "measure_name": "Rejection Rate, 3 Months" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-rejection-rate", + "query": "expense-claims-rejection-rate-3-months", + "sort_order": 3, + "title": "Rejection Rate", + "workbook": "expense-claims" + }, + "expense-claims-sanctioned-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", + "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" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-sanctioned-by-department", + "query": "expense-claims-sanctioned-12-months", + "sort_order": 8, + "title": "Sanctioned by Department", + "workbook": "expense-claims" + }, + "expense-claims-sanctioned-by-expense-type": { + "chart_type": "Donut", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "label_column": { + "column_name": "expense_type", + "data_type": "String", + "dimension_name": "Expense Type" + }, + "legend_position": "right", + "limit": 100, + "max_slices": 6, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [], + "show_inline_labels": true, + "value_column": { + "aggregation": "sum", + "column_name": "base_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Sanctioned" + } + }, + "folder": null, + "name": "expense-claims-sanctioned-by-expense-type", + "query": "expense-claims-claim-lines-12-months", + "sort_order": 7, + "title": "Sanctioned by Expense Type", + "workbook": "expense-claims" + }, + "expense-claims-sanctioned-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": "779d29c4", + "label": "12-month average", + "measure_name": "Sanctioned" + } + ], + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "base_total_sanctioned_amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Sanctioned" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "expense-claims-sanctioned-by-month", + "query": "expense-claims-sanctioned-12-months", + "sort_order": 5, + "title": "Sanctioned by Month", + "workbook": "expense-claims" + }, + "expense-claims-sanctioned-this-month-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last month", + "measure": { + "aggregation": "max", + "column_name": "sanctioned_last_month", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Same Days Last Month" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "sanctioned_mtd", + "data_type": "Decimal", + "format": "currency", + "id": "Sanctioned This Month", + "measure_name": "Sanctioned This Month" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "expense-claims-sanctioned-this-month-2", + "query": "expense-claims-sanctioned-this-month", + "sort_order": 1, + "title": "Sanctioned This Month", + "workbook": "expense-claims" + }, + "expense-claims-unpaid-claims-2": { + "chart_type": "Table", + "config": { + "columns": [], + "conditional_formatting": { + "columns": [], + "formats": [ + { + "color": "red", + "column": { + "column_name": "Days Open", + "type": "column" + }, + "mode": "cell_rules", + "operator": ">", + "value": 30 + }, + { + "color": "amber", + "column": { + "column_name": "Amount Due", + "type": "column" + }, + "mode": "rank_rules", + "operator": "top_n", + "value": 3 + } + ] + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_formats": { + "Amount Due": { + "decimals": 1, + "shorten": true + } + }, + "order_by": [ + { + "column": { + "column_name": "Days Open", + "type": "column" + }, + "direction": "desc" + } + ], + "rows": [ + { + "column_name": "name", + "data_type": "String", + "dimension_name": "Claim" + }, + { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" + }, + { + "column_name": "department", + "data_type": "String", + "dimension_name": "Department" + } + ], + "values": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum(base_grand_total)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Amount Due" + }, + { + "aggregation": "max", + "column_name": "days_since_filed", + "data_type": "Integer", + "measure_name": "Days Open" + } + ] + }, + "folder": null, + "name": "expense-claims-unpaid-claims-2", + "query": "expense-claims-unpaid-claims", + "sort_order": 9, + "title": "Unpaid Claims", + "workbook": "expense-claims" + } + }, + "creation": "2026-09-19 18:40:22.605032", + "dashboards": { + "expense-claims": { + "items": [ + { + "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-by-status": "`expense-claims-employee-advances`.`company`", + "expense-claims-claims-filed": "`expense-claims-expense-claims`.`company`", + "expense-claims-days-to-reimburse": "`expense-claims-expense-claims`.`company`", + "expense-claims-outstanding-advances-2": "`expense-claims-outstanding-advances`.`company`", + "expense-claims-reimbursement-turnaround": "`expense-claims-reimbursed-12-months`.`company`", + "expense-claims-rejection-rate": "`expense-claims-expense-claims`.`company`", + "expense-claims-sanctioned-by-department": "`expense-claims-sanctioned-12-months`.`company`", + "expense-claims-sanctioned-by-expense-type": "`expense-claims-claim-lines-12-months`.`company`", + "expense-claims-sanctioned-by-month": "`expense-claims-sanctioned-12-months`.`company`", + "expense-claims-sanctioned-this-month-2": "`expense-claims-expense-claims`.`company`", + "expense-claims-unpaid-claims-2": "`expense-claims-unpaid-claims`.`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-by-status": "`expense-claims-employee-advances`.`department`", + "expense-claims-claims-filed": "`expense-claims-expense-claims`.`department`", + "expense-claims-days-to-reimburse": "`expense-claims-expense-claims`.`department`", + "expense-claims-outstanding-advances-2": "`expense-claims-outstanding-advances`.`department`", + "expense-claims-reimbursement-turnaround": "`expense-claims-reimbursed-12-months`.`department`", + "expense-claims-rejection-rate": "`expense-claims-expense-claims`.`department`", + "expense-claims-sanctioned-by-department": "`expense-claims-sanctioned-12-months`.`department`", + "expense-claims-sanctioned-by-expense-type": "`expense-claims-claim-lines-12-months`.`department`", + "expense-claims-sanctioned-by-month": "`expense-claims-sanctioned-12-months`.`department`", + "expense-claims-sanctioned-this-month-2": "`expense-claims-expense-claims`.`department`", + "expense-claims-unpaid-claims-2": "`expense-claims-unpaid-claims`.`department`" + }, + "type": "filter" + }, + { + "chart": "expense-claims-sanctioned-this-month-2", + "layout": { + "h": 5, + "i": "chart-obi9q21nc0", + "w": 5, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-claims-filed", + "layout": { + "h": 5, + "i": "chart-obiu2j0659", + "w": 5, + "x": 5, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-rejection-rate", + "layout": { + "h": 5, + "i": "chart-obie29u4b3", + "w": 5, + "x": 10, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-days-to-reimburse", + "layout": { + "h": 5, + "i": "chart-obi4m7u5k7", + "w": 5, + "x": 15, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 13 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-sanctioned-by-month", + "layout": { + "h": 17, + "i": "chart-obis0c3mor", + "w": 10, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 18 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-reimbursement-turnaround", + "layout": { + "h": 17, + "i": "chart-obi8jh3nho", + "w": 10, + "x": 10, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 35 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-sanctioned-by-expense-type", + "layout": { + "h": 17, + "i": "chart-obiujrb42u", + "w": 10, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 52 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-sanctioned-by-department", + "layout": { + "h": 17, + "i": "chart-obink1fa4o", + "w": 10, + "x": 10, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 69 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-unpaid-claims-2", + "layout": { + "h": 19, + "i": "chart-obiundvd7t", + "w": 20, + "x": 0, + "y": 42 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 88 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-advances-by-status", + "layout": { + "h": 17, + "i": "chart-obivqm3nvp", + "w": 10, + "x": 0, + "y": 61 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 112 + } + }, + "type": "chart" + }, + { + "chart": "expense-claims-outstanding-advances-2", + "layout": { + "h": 19, + "i": "chart-obika8b2vb", + "w": 10, + "x": 10, + "y": 61 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 129 + } + }, + "type": "chart" + } + ], + "name": "expense-claims", + "title": "Expense Claims", + "vertical_compact_layout": 1, + "workbook": "expense-claims" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-19 19:02:24.567732", + "modified_by": "Administrator", + "module": "HR", + "name": "expense-claims", + "owner": "Administrator", + "queries": { + "expense-claims-claim-lines-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-claim-lines-12-months", + "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": "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(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "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", + "posting_date", + "department", + "company", + "expense_type", + "base_sanctioned_amount" + ], + "type": "select" + } + ], + "sort_order": 2, + "title": "Claim Lines, 12 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-claims-filed-3-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-claims-filed-3-months", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "posting_date.between(date_sub(month_start(today()), 6, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Integer", + "expression": { + "expression": "count_if(posting_date >= date_sub(month_start(today()), 3, 'month'))", + "type": "expression" + }, + "measure_name": "claims_filed" + }, + { + "data_type": "Integer", + "expression": { + "expression": "count_if(posting_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day'))", + "type": "expression" + }, + "measure_name": "claims_filed_prior" + } + ], + "type": "summarize" + } + ], + "sort_order": 5, + "title": "Claims Filed, 3 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-days-to-reimburse-3-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-days-to-reimburse-3-months", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "clearance_date.between(date_sub(month_start(today()), 6, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "avg(days_to_reimburse, clearance_date >= date_sub(month_start(today()), 3, 'month'))", + "type": "expression" + }, + "measure_name": "days_to_reimburse" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "avg(days_to_reimburse, clearance_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day'))", + "type": "expression" + }, + "measure_name": "days_to_reimburse_prior" + } + ], + "type": "summarize" + } + ], + "sort_order": 7, + "title": "Days to Reimburse, 3 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-employee-advances": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-employee-advances", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabEmployee Advance", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "<", + "value": 2 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "name", + "posting_date", + "employee", + "employee_name", + "department", + "company", + "purpose", + "status", + "advance_amount", + "paid_amount", + "claimed_amount", + "return_amount" + ], + "type": "select" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(today(), posting_date, 'day')", + "type": "expression" + }, + "new_name": "days_outstanding", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "paid_amount - claimed_amount - return_amount", + "type": "expression" + }, + "new_name": "unclaimed_amount", + "type": "mutate" + } + ], + "sort_order": 3, + "title": "Employee Advances", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-expense-claims": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-expense-claims", + "operations": [ + { + "table": { + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "<", + "value": 2 + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "name", + "posting_date", + "clearance_date", + "employee", + "employee_name", + "department", + "company", + "approval_status", + "status", + "base_total_claimed_amount", + "base_total_sanctioned_amount", + "base_grand_total", + "base_total_advance_amount" + ], + "type": "select" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(today(), posting_date, 'day')", + "type": "expression" + }, + "new_name": "days_since_filed", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(clearance_date, posting_date, 'day')", + "type": "expression" + }, + "new_name": "days_to_reimburse", + "type": "mutate" + } + ], + "sort_order": 1, + "title": "Expense Claims", + "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": { + "query_name": "expense-claims-employee-advances", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "unclaimed_amount", + "type": "column" + }, + "operator": ">", + "value": 0 + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 11, + "title": "Outstanding Advances", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-reimbursed-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-reimbursed-12-months", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "clearance_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": 9, + "title": "Reimbursed, 12 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-rejection-rate-3-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-rejection-rate-3-months", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "posting_date.between(date_sub(month_start(today()), 6, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "count_if((posting_date >= date_sub(month_start(today()), 3, 'month')) & (approval_status == 'Rejected')) / count_if((posting_date >= date_sub(month_start(today()), 3, 'month')) & (approval_status != 'Draft'))", + "type": "expression" + }, + "format": "percent", + "measure_name": "rejection_rate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "count_if((posting_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day')) & (approval_status == 'Rejected')) / count_if((posting_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day')) & (approval_status != 'Draft'))", + "type": "expression" + }, + "format": "percent", + "measure_name": "rejection_rate_prior" + } + ], + "type": "summarize" + } + ], + "sort_order": 6, + "title": "Rejection Rate, 3 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-sanctioned-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-sanctioned-12-months", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "approval_status == 'Approved'", + "type": "expression" + } + }, + { + "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": 8, + "title": "Sanctioned, 12 Months", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-sanctioned-this-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-sanctioned-this-month", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "posting_date.between(date_sub(month_start(today()), 1, 'month'), today())", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if((posting_date >= month_start(today())) & (approval_status == 'Approved'), base_total_sanctioned_amount)", + "type": "expression" + }, + "format": "currency", + "measure_name": "sanctioned_mtd" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if((posting_date <= date_sub(today(), 1, 'month')) & (approval_status == 'Approved'), base_total_sanctioned_amount)", + "type": "expression" + }, + "format": "currency", + "measure_name": "sanctioned_last_month" + } + ], + "type": "summarize" + } + ], + "sort_order": 4, + "title": "Sanctioned This Month", + "use_live_connection": 1, + "workbook": "expense-claims" + }, + "expense-claims-unpaid-claims": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "expense-claims-unpaid-claims", + "operations": [ + { + "table": { + "query_name": "expense-claims-expense-claims", + "type": "query", + "workbook": "expense-claims" + }, + "type": "source" + }, + { + "filters": [ + { + "column": { + "column_name": "status", + "type": "column" + }, + "operator": "=", + "value": "Unpaid" + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 10, + "title": "Unpaid Claims", + "use_live_connection": 1, + "workbook": "expense-claims" + } + }, + "title": "Expense Claims" +} diff --git a/hrms/hr/insights_workbook/human_resource/human_resource.json b/hrms/hr/insights_workbook/human_resource/human_resource.json new file mode 100644 index 00000000000..39ef1cb5033 --- /dev/null +++ b/hrms/hr/insights_workbook/human_resource/human_resource.json @@ -0,0 +1,1565 @@ +{ + "charts": { + "human-resource-attrition-rolling-12-months-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs prior 12 months", + "measure": { + "aggregation": "max", + "column_name": "attrition_prior", + "data_type": "Decimal", + "format": "percent", + "measure_name": "Prior 12 Months" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 1, + "negative_is_better": true, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "attrition", + "data_type": "Decimal", + "format": "percent", + "id": "Attrition, 12 Months", + "measure_name": "Attrition, 12 Months" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "human-resource-attrition-rolling-12-months-2", + "query": "human-resource-attrition-rolling-12-months", + "sort_order": 4, + "title": "Attrition, Rolling 12 Months", + "workbook": "human-resource" + }, + "human-resource-average-tenure-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last year", + "measure": { + "aggregation": "max", + "column_name": "tenure_years_last_year", + "data_type": "Decimal", + "measure_name": "A Year Ago" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 1, + "shorten": false, + "suffix": " yrs" + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "tenure_years", + "data_type": "Decimal", + "id": "Average Tenure", + "measure_name": "Average Tenure" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "human-resource-average-tenure-2", + "query": "human-resource-average-tenure", + "sort_order": 5, + "title": "Average Tenure", + "workbook": "human-resource" + }, + "human-resource-exits-12-months": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs prior 12 months", + "measure": { + "aggregation": "max", + "column_name": "exits_prior", + "data_type": "Integer", + "measure_name": "Exits, Prior 12 Months" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 0, + "negative_is_better": true, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "exits", + "data_type": "Integer", + "id": "Exits, 12 Months", + "measure_name": "Exits, 12 Months" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "human-resource-exits-12-months", + "query": "human-resource-joins-exits-12-months", + "sort_order": 3, + "title": "Exits, 12 Months", + "workbook": "human-resource" + }, + "human-resource-exits-by-department-12-months": { + "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": "People", + "reference_lines": [ + { + "aggregate": "average", + "axis": "y", + "dashed": true, + "id": "7ae633cf", + "label": "Company average", + "measure_name": "Exits" + } + ], + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "exits", + "data_type": "Integer", + "measure_name": "Exits" + }, + "type": "bar" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "human-resource-exits-by-department-12-months", + "query": "human-resource-workforce-by-month", + "sort_order": 9, + "title": "Exits by Department, 12 Months", + "workbook": "human-resource" + }, + "human-resource-headcount-2": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last year", + "measure": { + "aggregation": "max", + "column_name": "headcount_last_year", + "data_type": "Integer", + "measure_name": "A Year Ago" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "headcount", + "data_type": "Integer", + "id": "Headcount", + "measure_name": "Headcount" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "human-resource-headcount-2", + "query": "human-resource-headcount", + "sort_order": 1, + "title": "Headcount", + "workbook": "human-resource" + }, + "human-resource-headcount-joins-exits-12-months": { + "chart_type": "Bar", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "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": "People joined and left", + "series": [ + { + "measure": { + "data_type": "Integer", + "expression": { + "expression": "sum(joins)", + "type": "expression" + }, + "measure_name": "Joins" + }, + "type": "bar" + }, + { + "measure": { + "data_type": "Integer", + "expression": { + "expression": "0 - sum(exits)", + "type": "expression" + }, + "measure_name": "Exits" + }, + "type": "bar" + }, + { + "align": "Right", + "measure": { + "data_type": "Integer", + "expression": { + "expression": "sum(headcount)", + "type": "expression" + }, + "measure_name": "Headcount" + }, + "show_data_points": true, + "smooth": true, + "type": "line" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "human-resource-headcount-joins-exits-12-months", + "query": "human-resource-workforce-by-month", + "sort_order": 6, + "title": "Headcount, Joins & Exits, 12 Months", + "workbook": "human-resource" + }, + "human-resource-joiners-leavers-12-months-2": { + "chart_type": "Table", + "config": { + "columns": [], + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 12, + "number_formats": { + "Tenure": { + "decimals": 1, + "shorten": false, + "suffix": " yrs" + } + }, + "order_by": [ + { + "column": { + "column_name": "Moved On", + "type": "column" + }, + "direction": "desc" + } + ], + "rows": [ + { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" + }, + { + "column_name": "department_name", + "data_type": "String", + "dimension_name": "Department" + }, + { + "column_name": "movement", + "data_type": "String", + "dimension_name": "Movement" + } + ], + "values": [ + { + "aggregation": "max", + "column_name": "moved_on", + "data_type": "Date", + "measure_name": "Moved On" + }, + { + "aggregation": "max", + "column_name": "tenure_years", + "data_type": "Decimal", + "measure_name": "Tenure" + } + ] + }, + "folder": null, + "name": "human-resource-joiners-leavers-12-months-2", + "query": "human-resource-joiners-leavers-12-months", + "sort_order": 10, + "title": "Joiners & Leavers, 12 Months", + "workbook": "human-resource" + }, + "human-resource-joins-12-months": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs prior 12 months", + "measure": { + "aggregation": "max", + "column_name": "joins_prior", + "data_type": "Integer", + "measure_name": "Prior 12 Months" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "joins", + "data_type": "Integer", + "id": "Joins, 12 Months", + "measure_name": "Joins, 12 Months" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "human-resource-joins-12-months", + "query": "human-resource-joins-exits-12-months", + "sort_order": 2, + "title": "Joins, 12 Months", + "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": "People" + } + }, + "folder": null, + "name": "human-resource-workforce-by-department", + "query": "human-resource-active-roster", + "sort_order": 7, + "title": "Workforce 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": "People", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "designation", + "data_type": "String", + "dimension_name": "Designation" + } + }, + "y_axis": { + "axis_label": "People", + "series": [ + { + "measure": { + "aggregation": "count", + "column_name": "name", + "data_type": "Integer", + "measure_name": "People" + }, + "type": "bar" + } + ], + "show_axis_label": true + } + }, + "folder": null, + "name": "human-resource-workforce-by-designation", + "query": "human-resource-active-roster", + "sort_order": 8, + "title": "Workforce by Designation", + "workbook": "human-resource" + } + }, + "creation": "2026-09-19 18:36:43.462880", + "dashboards": { + "human-resource": { + "items": [ + { + "filter_name": "Company", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-company", + "w": 4, + "x": 0, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 10, + "x": 0, + "y": 0 + } + }, + "links": { + "human-resource-attrition-rolling-12-months-2": "`human-resource-employee-roster`.`company`", + "human-resource-average-tenure-2": "`human-resource-employee-roster`.`company`", + "human-resource-exits-12-months": "`human-resource-employee-roster`.`company`", + "human-resource-exits-by-department-12-months": "`human-resource-workforce-by-month`.`company`", + "human-resource-headcount-2": "`human-resource-employee-roster`.`company`", + "human-resource-headcount-joins-exits-12-months": "`human-resource-workforce-by-month`.`company`", + "human-resource-joiners-leavers-12-months-2": "`human-resource-joiners-leavers-12-months`.`company`", + "human-resource-joins-12-months": "`human-resource-employee-roster`.`company`", + "human-resource-workforce-by-department": "`human-resource-active-roster`.`company`", + "human-resource-workforce-by-designation": "`human-resource-active-roster`.`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": 10, + "y": 0 + } + }, + "links": { + "human-resource-attrition-rolling-12-months-2": "`human-resource-employee-roster`.`department_name`", + "human-resource-average-tenure-2": "`human-resource-employee-roster`.`department_name`", + "human-resource-exits-12-months": "`human-resource-employee-roster`.`department_name`", + "human-resource-exits-by-department-12-months": "`human-resource-workforce-by-month`.`department_name`", + "human-resource-headcount-2": "`human-resource-employee-roster`.`department_name`", + "human-resource-headcount-joins-exits-12-months": "`human-resource-workforce-by-month`.`department_name`", + "human-resource-joiners-leavers-12-months-2": "`human-resource-joiners-leavers-12-months`.`department_name`", + "human-resource-joins-12-months": "`human-resource-employee-roster`.`department_name`", + "human-resource-workforce-by-department": "`human-resource-active-roster`.`department_name`", + "human-resource-workforce-by-designation": "`human-resource-active-roster`.`department_name`" + }, + "type": "filter" + }, + { + "filter_name": "Designation", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-designation", + "w": 4, + "x": 8, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 10, + "x": 0, + "y": 3 + } + }, + "links": { + "human-resource-attrition-rolling-12-months-2": "`human-resource-employee-roster`.`designation`", + "human-resource-average-tenure-2": "`human-resource-employee-roster`.`designation`", + "human-resource-exits-12-months": "`human-resource-employee-roster`.`designation`", + "human-resource-exits-by-department-12-months": "`human-resource-workforce-by-month`.`designation`", + "human-resource-headcount-2": "`human-resource-employee-roster`.`designation`", + "human-resource-headcount-joins-exits-12-months": "`human-resource-workforce-by-month`.`designation`", + "human-resource-joiners-leavers-12-months-2": "`human-resource-joiners-leavers-12-months`.`designation`", + "human-resource-joins-12-months": "`human-resource-employee-roster`.`designation`", + "human-resource-workforce-by-department": "`human-resource-active-roster`.`designation`", + "human-resource-workforce-by-designation": "`human-resource-active-roster`.`designation`" + }, + "type": "filter" + }, + { + "chart": "human-resource-headcount-2", + "layout": { + "h": 5, + "i": "chart-m72911uk1j", + "w": 4, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 3 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-joins-12-months", + "layout": { + "h": 5, + "i": "chart-m72o4skd9d", + "w": 4, + "x": 4, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-exits-12-months", + "layout": { + "h": 5, + "i": "chart-m722r6hi8r", + "w": 4, + "x": 8, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 8 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-attrition-rolling-12-months-2", + "layout": { + "h": 5, + "i": "chart-m72q8cgae4", + "w": 4, + "x": 12, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 13 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-average-tenure-2", + "layout": { + "h": 5, + "i": "chart-m72g9v1p53", + "w": 4, + "x": 16, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 20, + "x": 0, + "y": 18 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-headcount-joins-exits-12-months", + "layout": { + "h": 17, + "i": "chart-m7231eb4kd", + "w": 20, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 23 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-workforce-by-department", + "layout": { + "h": 17, + "i": "chart-m721bb1ugf", + "w": 10, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 40 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-workforce-by-designation", + "layout": { + "h": 17, + "i": "chart-m72h2frbuf", + "w": 10, + "x": 10, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 57 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-exits-by-department-12-months", + "layout": { + "h": 17, + "i": "chart-m72llhjdda", + "w": 10, + "x": 0, + "y": 42 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 76 + } + }, + "type": "chart" + }, + { + "chart": "human-resource-joiners-leavers-12-months-2", + "layout": { + "h": 17, + "i": "chart-m72nte58m2", + "w": 10, + "x": 10, + "y": 42 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 93 + } + }, + "type": "chart" + } + ], + "name": "human-resource", + "title": "Human Resource", + "vertical_compact_layout": 1, + "workbook": "human-resource" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-19 19:02:19.951485", + "modified_by": "Administrator", + "module": "HR", + "name": "human-resource", + "owner": "Administrator", + "queries": { + "human-resource-active-roster": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-active-roster", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "date_of_joining <= today()", + "type": "expression" + } + }, + { + "expression": { + "expression": "exit_date > today()", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 2, + "title": "Active Roster", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-attrition-rolling-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-attrition-rolling-12-months", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "exits" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 24, 'month'), date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "exits_prior" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(month_start(today()), 12, 'month')) & (exit_date > date_sub(month_start(today()), 12, 'month')), one_person)", + "type": "expression" + }, + "measure_name": "headcount_start" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(month_start(today()), 1, 'day')) & (exit_date > date_sub(month_start(today()), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "headcount_end" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(month_start(today()), 24, 'month')) & (exit_date > date_sub(month_start(today()), 24, 'month')), one_person)", + "type": "expression" + }, + "measure_name": "headcount_start_prior" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')) & (exit_date > date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "headcount_end_prior" + } + ], + "type": "summarize" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "exits / ((headcount_start + headcount_end) / 2)", + "type": "expression" + }, + "new_name": "attrition", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "exits_prior / ((headcount_start_prior + headcount_end_prior) / 2)", + "type": "expression" + }, + "new_name": "attrition_prior", + "type": "mutate" + } + ], + "sort_order": 5, + "title": "Attrition, Rolling 12 Months", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-average-tenure": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-average-tenure", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(today(), date_of_joining, 'day')", + "type": "expression" + }, + "new_name": "tenure_days", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "date_diff(date_sub(today(), 1, 'year'), date_of_joining, 'day')", + "type": "expression" + }, + "new_name": "tenure_days_last_year", + "type": "mutate" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if((date_of_joining <= today()) & (exit_date > today()), tenure_days)", + "type": "expression" + }, + "measure_name": "tenure_days_sum" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= today()) & (exit_date > today()), one_person)", + "type": "expression" + }, + "measure_name": "headcount" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(today(), 1, 'year')) & (exit_date > date_sub(today(), 1, 'year')), tenure_days_last_year)", + "type": "expression" + }, + "measure_name": "tenure_days_sum_last_year" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(today(), 1, 'year')) & (exit_date > date_sub(today(), 1, 'year')), one_person)", + "type": "expression" + }, + "measure_name": "headcount_last_year" + } + ], + "type": "summarize" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "tenure_days_sum / headcount / 365.25", + "type": "expression" + }, + "new_name": "tenure_years", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "tenure_days_sum_last_year / headcount_last_year / 365.25", + "type": "expression" + }, + "new_name": "tenure_years_last_year", + "type": "mutate" + } + ], + "sort_order": 6, + "title": "Average Tenure", + "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": "Date", + "expression": { + "expression": "if_null(relieving_date, date_add(today(), 100, 'year'))", + "type": "expression" + }, + "new_name": "exit_date", + "type": "mutate" + }, + { + "data_type": "Date", + "expression": { + "expression": "month_start(date_of_joining)", + "type": "expression" + }, + "new_name": "join_period", + "type": "mutate" + }, + { + "data_type": "Date", + "expression": { + "expression": "month_start(exit_date)", + "type": "expression" + }, + "new_name": "exit_period", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "ibis.literal(1)", + "type": "expression" + }, + "new_name": "one_person", + "type": "mutate" + }, + { + "column_names": [ + "name", + "employee_name", + "company", + "department_name", + "designation", + "status", + "date_of_joining", + "relieving_date", + "exit_date", + "join_period", + "exit_period", + "one_person" + ], + "type": "select" + } + ], + "sort_order": 1, + "title": "Employee Roster", + "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" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= today()) & (exit_date > today()), one_person)", + "type": "expression" + }, + "measure_name": "headcount" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((date_of_joining <= date_sub(today(), 1, 'year')) & (exit_date > date_sub(today(), 1, 'year')), one_person)", + "type": "expression" + }, + "measure_name": "headcount_last_year" + } + ], + "type": "summarize" + } + ], + "sort_order": 3, + "title": "Headcount", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-joiners-leavers-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-joiners-leavers-12-months", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "date_of_joining.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')) | relieving_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + }, + { + "data_type": "Date", + "expression": { + "expression": "if_null(relieving_date, date_of_joining)", + "type": "expression" + }, + "new_name": "moved_on", + "type": "mutate" + }, + { + "data_type": "String", + "expression": { + "expression": "if_else(is_set(relieving_date), 'Left', 'Joined')", + "type": "expression" + }, + "new_name": "movement", + "type": "mutate" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "date_diff(if_null(relieving_date, today()), date_of_joining, 'day') / 365.25", + "type": "expression" + }, + "new_name": "tenure_years", + "type": "mutate" + }, + { + "column": { + "column_name": "moved_on", + "type": "column" + }, + "direction": "desc", + "type": "order_by" + } + ], + "sort_order": 9, + "title": "Joiners & Leavers, 12 Months", + "use_live_connection": 1, + "workbook": "human-resource" + }, + "human-resource-joins-exits-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "human-resource-joins-exits-12-months", + "operations": [ + { + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "source" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(date_of_joining.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "joins" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(date_of_joining.between(date_sub(month_start(today()), 24, 'month'), date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "joins_prior" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "exits" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 24, 'month'), date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", + "type": "expression" + }, + "measure_name": "exits_prior" + } + ], + "type": "summarize" + } + ], + "sort_order": 4, + "title": "Joins & Exits, 12 Months", + "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": 7, + "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": "company", + "type": "column" + }, + { + "column_name": "department_name", + "type": "column" + }, + { + "column_name": "designation", + "type": "column" + }, + { + "column_name": "join_period", + "type": "column" + }, + { + "column_name": "exit_period", + "type": "column" + } + ], + "table": { + "query_name": "human-resource-employee-roster", + "type": "query", + "workbook": "human-resource" + }, + "type": "join" + }, + { + "dimensions": [ + { + "column_name": "period", + "data_type": "Date", + "dimension_name": "period", + "granularity": "month" + }, + { + "column_name": "company", + "data_type": "String", + "dimension_name": "company" + }, + { + "column_name": "department_name", + "data_type": "String", + "dimension_name": "department_name" + }, + { + "column_name": "designation", + "data_type": "String", + "dimension_name": "designation" + } + ], + "measures": [ + { + "data_type": "Integer", + "expression": { + "expression": "sum_if((join_period <= period) & (exit_period > period), one_person)", + "type": "expression" + }, + "measure_name": "headcount_raw" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(join_period == period, one_person)", + "type": "expression" + }, + "measure_name": "joins_raw" + }, + { + "data_type": "Integer", + "expression": { + "expression": "sum_if(exit_period == period, one_person)", + "type": "expression" + }, + "measure_name": "exits_raw" + } + ], + "type": "summarize" + }, + { + "data_type": "Integer", + "expression": { + "expression": "if_null(headcount_raw, 0)", + "type": "expression" + }, + "new_name": "headcount", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "if_null(joins_raw, 0)", + "type": "expression" + }, + "new_name": "joins", + "type": "mutate" + }, + { + "data_type": "Integer", + "expression": { + "expression": "if_null(exits_raw, 0)", + "type": "expression" + }, + "new_name": "exits", + "type": "mutate" + }, + { + "column_names": [ + "period", + "company", + "department_name", + "designation", + "headcount", + "joins", + "exits" + ], + "type": "select" + }, + { + "column": { + "column_name": "period", + "type": "column" + }, + "direction": "asc", + "type": "order_by" + } + ], + "sort_order": 8, + "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..4afe4a76322 --- /dev/null +++ b/hrms/payroll/insights_workbook/payroll/payroll.json @@ -0,0 +1,1388 @@ +{ + "charts": { + "payroll-cost-per-employee": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last year", + "measure": { + "aggregation": "max", + "column_name": "cost_per_employee_last_year", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Same Month Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "cost_per_employee", + "data_type": "Decimal", + "format": "currency", + "id": "Cost per Employee", + "measure_name": "Cost per Employee" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-cost-per-employee", + "query": "payroll-cost-per-employee-last-month", + "sort_order": 3, + "title": "Cost per Employee", + "workbook": "payroll" + }, + "payroll-cost-per-employee-by-month": { + "chart_type": "Line", + "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": { + "data_type": "Decimal", + "expression": { + "expression": "sum(gross_pay) / count(name)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Cost per Employee" + }, + "show_data_points": true, + "smooth": true, + "type": "line" + } + ] + } + }, + "folder": null, + "name": "payroll-cost-per-employee-by-month", + "query": "payroll-payroll-12-months", + "sort_order": 6, + "title": "Cost per Employee by Month", + "workbook": "payroll" + }, + "payroll-deductions-share": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last year", + "measure": { + "aggregation": "max", + "column_name": "deductions_share_last_year", + "data_type": "Decimal", + "format": "percent", + "measure_name": "Same Month Last Year" + }, + "show": "delta", + "source": "measure" + }, + "decimals": 1, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "deductions_share", + "data_type": "Decimal", + "format": "percent", + "id": "Deductions Share", + "measure_name": "Deductions Share" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-deductions-share", + "query": "payroll-deductions-share-last-month", + "sort_order": 4, + "title": "Deductions Share", + "workbook": "payroll" + }, + "payroll-earnings-mix-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" + } + ], + "split_by": { + "dimension": { + "column_name": "salary_component", + "data_type": "String", + "dimension_name": "Component" + }, + "max_split_values": 3 + }, + "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": "amount", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Earnings" + }, + "type": "bar" + } + ], + "stack": true + } + }, + "folder": null, + "name": "payroll-earnings-mix-by-month", + "query": "payroll-earnings-by-component-12-months", + "sort_order": 7, + "title": "Earnings Mix by Month", + "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": { + "aggregation": "max", + "column_name": "employees_paid_last_year", + "data_type": "Integer", + "measure_name": "Same Month Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 0, + "shorten": false + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "employees_paid", + "data_type": "Integer", + "id": "Employees Paid", + "measure_name": "Employees Paid" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-employees-paid", + "query": "payroll-employees-paid-last-month", + "sort_order": 2, + "title": "Employees Paid", + "workbook": "payroll" + }, + "payroll-pay-change-year-over-year-2": { + "chart_type": "Table", + "config": { + "columns": [], + "conditional_formatting": { + "columns": [], + "formats": [ + { + "color": "amber", + "column": { + "column_name": "Change", + "type": "column" + }, + "mode": "rank_rules", + "operator": "top_n", + "value": 5 + } + ] + }, + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_formats": { + "Change": { + "decimals": 1, + "shorten": false + }, + "Last Month": { + "decimals": 1, + "shorten": true + }, + "Same Month Last Year": { + "decimals": 1, + "shorten": true + } + }, + "order_by": [ + { + "column": { + "column_name": "Change", + "type": "column" + }, + "direction": "desc" + } + ], + "rows": [ + { + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" + }, + { + "column_name": "department", + "data_type": "String", + "dimension_name": "Department" + }, + { + "column_name": "designation", + "data_type": "String", + "dimension_name": "Designation" + } + ], + "values": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Last Month" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", + "type": "expression" + }, + "format": "currency", + "measure_name": "Same Month Last Year" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "(sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay) - sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)) / sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", + "type": "expression" + }, + "format": "percent", + "measure_name": "Change" + } + ] + }, + "folder": null, + "name": "payroll-pay-change-year-over-year-2", + "query": "payroll-pay-change-year-over-year", + "sort_order": 10, + "title": "Pay Change, Year over Year", + "workbook": "payroll" + }, + "payroll-payroll-by-department": { + "chart_type": "Donut", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "label_column": { + "column_name": "department", + "data_type": "String", + "dimension_name": "Department" + }, + "legend_position": "right", + "limit": 100, + "max_slices": 6, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [], + "show_inline_labels": true, + "value_column": { + "aggregation": "sum", + "column_name": "gross_pay", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Payroll Cost" + } + }, + "folder": null, + "name": "payroll-payroll-by-department", + "query": "payroll-payroll-last-month", + "sort_order": 8, + "title": "Payroll by Department", + "workbook": "payroll" + }, + "payroll-payroll-by-designation": { + "chart_type": "Row", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 10, + "number_format": { + "decimals": 1, + "shorten": true + }, + "order_by": [ + { + "column": { + "column_name": "Payroll Cost", + "type": "column" + }, + "direction": "desc" + } + ], + "x_axis": { + "dimension": { + "column_name": "designation", + "data_type": "String", + "dimension_name": "Designation" + } + }, + "y_axis": { + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "gross_pay", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Payroll Cost" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "payroll-payroll-by-designation", + "query": "payroll-payroll-last-month", + "sort_order": 9, + "title": "Payroll by Designation", + "workbook": "payroll" + }, + "payroll-payroll-cost": { + "chart_type": "Number", + "config": { + "filters": { + "filters": [], + "logical_operator": "And" + }, + "limit": 100, + "number_column_options": [ + { + "comparison": { + "label": "vs last year", + "measure": { + "aggregation": "max", + "column_name": "payroll_cost_last_year", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Same Month Last Year" + }, + "show": "change", + "source": "measure" + }, + "decimals": 1, + "shorten": true + } + ], + "number_columns": [ + { + "aggregation": "max", + "column_name": "payroll_cost", + "data_type": "Decimal", + "format": "currency", + "id": "Payroll Cost, Last Month", + "measure_name": "Payroll Cost, Last Month" + } + ], + "order_by": [], + "sparkline": false + }, + "folder": null, + "name": "payroll-payroll-cost", + "query": "payroll-payroll-cost-last-month", + "sort_order": 1, + "title": "Payroll Cost", + "workbook": "payroll" + }, + "payroll-payroll-cost-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, + "reference_lines": [ + { + "aggregate": "average", + "axis": "y", + "dashed": true, + "id": "3206ab6e", + "label": "12-month average", + "measure_name": "Payroll Cost" + } + ], + "series": [ + { + "measure": { + "aggregation": "sum", + "column_name": "gross_pay", + "data_type": "Decimal", + "format": "currency", + "measure_name": "Payroll Cost" + }, + "type": "bar" + } + ] + } + }, + "folder": null, + "name": "payroll-payroll-cost-by-month", + "query": "payroll-payroll-12-months", + "sort_order": 5, + "title": "Payroll Cost by Month", + "workbook": "payroll" + } + }, + "creation": "2026-09-19 18:37:24.379823", + "dashboards": { + "payroll": { + "items": [ + { + "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-cost-per-employee": "`payroll-salary-slips`.`company`", + "payroll-cost-per-employee-by-month": "`payroll-payroll-12-months`.`company`", + "payroll-deductions-share": "`payroll-salary-slips`.`company`", + "payroll-earnings-mix-by-month": "`payroll-earnings-by-component-12-months`.`company`", + "payroll-employees-paid": "`payroll-salary-slips`.`company`", + "payroll-pay-change-year-over-year-2": "`payroll-pay-change-year-over-year`.`company`", + "payroll-payroll-by-department": "`payroll-payroll-last-month`.`company`", + "payroll-payroll-by-designation": "`payroll-payroll-last-month`.`company`", + "payroll-payroll-cost": "`payroll-salary-slips`.`company`", + "payroll-payroll-cost-by-month": "`payroll-payroll-12-months`.`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": { + "payroll-cost-per-employee": "`payroll-salary-slips`.`department`", + "payroll-cost-per-employee-by-month": "`payroll-payroll-12-months`.`department`", + "payroll-deductions-share": "`payroll-salary-slips`.`department`", + "payroll-earnings-mix-by-month": "`payroll-earnings-by-component-12-months`.`department`", + "payroll-employees-paid": "`payroll-salary-slips`.`department`", + "payroll-pay-change-year-over-year-2": "`payroll-pay-change-year-over-year`.`department`", + "payroll-payroll-by-department": "`payroll-payroll-last-month`.`department`", + "payroll-payroll-by-designation": "`payroll-payroll-last-month`.`department`", + "payroll-payroll-cost": "`payroll-salary-slips`.`department`", + "payroll-payroll-cost-by-month": "`payroll-payroll-12-months`.`department`" + }, + "type": "filter" + }, + { + "filter_name": "Designation", + "filter_type": "String", + "layout": { + "h": 2, + "i": "filter-designation", + "w": 4, + "x": 8, + "y": 0 + }, + "layouts": { + "sm": { + "h": 2, + "w": 10, + "x": 10, + "y": 3 + } + }, + "links": { + "payroll-cost-per-employee": "`payroll-salary-slips`.`designation`", + "payroll-cost-per-employee-by-month": "`payroll-payroll-12-months`.`designation`", + "payroll-deductions-share": "`payroll-salary-slips`.`designation`", + "payroll-earnings-mix-by-month": "`payroll-earnings-by-component-12-months`.`designation`", + "payroll-employees-paid": "`payroll-salary-slips`.`designation`", + "payroll-pay-change-year-over-year-2": "`payroll-pay-change-year-over-year`.`designation`", + "payroll-payroll-by-department": "`payroll-payroll-last-month`.`designation`", + "payroll-payroll-by-designation": "`payroll-payroll-last-month`.`designation`", + "payroll-payroll-cost": "`payroll-salary-slips`.`designation`", + "payroll-payroll-cost-by-month": "`payroll-payroll-12-months`.`designation`" + }, + "type": "filter" + }, + { + "chart": "payroll-payroll-cost", + "layout": { + "h": 5, + "i": "chart-mjrheoe8kl", + "w": 5, + "x": 0, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 5 + } + }, + "type": "chart" + }, + { + "chart": "payroll-employees-paid", + "layout": { + "h": 5, + "i": "chart-mjr44ujku7", + "w": 5, + "x": 5, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 5 + } + }, + "type": "chart" + }, + { + "chart": "payroll-cost-per-employee", + "layout": { + "h": 5, + "i": "chart-mjr8t2sg47", + "w": 5, + "x": 10, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 0, + "y": 10 + } + }, + "type": "chart" + }, + { + "chart": "payroll-deductions-share", + "layout": { + "h": 5, + "i": "chart-mjr3j0qc6v", + "w": 5, + "x": 15, + "y": 3 + }, + "layouts": { + "sm": { + "h": 5, + "w": 10, + "x": 10, + "y": 10 + } + }, + "type": "chart" + }, + { + "chart": "payroll-payroll-cost-by-month", + "layout": { + "h": 17, + "i": "chart-mjrl4k08kc", + "w": 10, + "x": 0, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 15 + } + }, + "type": "chart" + }, + { + "chart": "payroll-cost-per-employee-by-month", + "layout": { + "h": 17, + "i": "chart-mjra2ubkn4", + "w": 10, + "x": 10, + "y": 8 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 32 + } + }, + "type": "chart" + }, + { + "chart": "payroll-earnings-mix-by-month", + "layout": { + "h": 19, + "i": "chart-mjrup84m15", + "w": 20, + "x": 0, + "y": 25 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 49 + } + }, + "type": "chart" + }, + { + "chart": "payroll-payroll-by-department", + "layout": { + "h": 17, + "i": "chart-mjr3mlq2nv", + "w": 10, + "x": 0, + "y": 44 + }, + "layouts": { + "sm": { + "h": 17, + "w": 20, + "x": 0, + "y": 68 + } + }, + "type": "chart" + }, + { + "chart": "payroll-payroll-by-designation", + "layout": { + "h": 17, + "i": "chart-mjsiuq62t2", + "w": 10, + "x": 10, + "y": 44 + }, + "layouts": { + "sm": { + "h": 19, + "w": 20, + "x": 0, + "y": 85 + } + }, + "type": "chart" + }, + { + "chart": "payroll-pay-change-year-over-year-2", + "layout": { + "h": 22, + "i": "chart-mjsm668bok", + "w": 20, + "x": 0, + "y": 61 + }, + "layouts": { + "sm": { + "h": 24, + "w": 20, + "x": 0, + "y": 104 + } + }, + "type": "chart" + } + ], + "name": "payroll", + "title": "Payroll", + "vertical_compact_layout": 1, + "workbook": "payroll" + } + }, + "docstatus": 0, + "doctype": "Insights Workbook", + "folders": [], + "idx": 0, + "is_standard": 1, + "modified": "2026-09-19 19:02:28.617322", + "modified_by": "Administrator", + "module": "Payroll", + "name": "payroll", + "owner": "Administrator", + "queries": { + "payroll-cost-per-employee-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-cost-per-employee-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" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay) / count_if(start_date >= date_sub(month_start(today()), 1, 'month'))", + "type": "expression" + }, + "format": "currency", + "measure_name": "cost_per_employee" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay) / count_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'))", + "type": "expression" + }, + "format": "currency", + "measure_name": "cost_per_employee_last_year" + } + ], + "type": "summarize" + } + ], + "sort_order": 4, + "title": "Cost per Employee, Last Month", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-deductions-share-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-deductions-share-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" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), total_deduction) / sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay)", + "type": "expression" + }, + "format": "percent", + "measure_name": "deductions_share" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), total_deduction) / sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", + "type": "expression" + }, + "format": "percent", + "measure_name": "deductions_share_last_year" + } + ], + "type": "summarize" + } + ], + "sort_order": 5, + "title": "Deductions Share, Last Month", + "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": { + "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 + }, + { + "column": { + "column_name": "statistical_component", + "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": "company", + "type": "column" + }, + { + "column_name": "department", + "type": "column" + }, + { + "column_name": "designation", + "type": "column" + } + ], + "table": { + "data_source": "Site DB", + "table_name": "tabSalary Slip", + "type": "table" + }, + "type": "join" + }, + { + "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" + }, + { + "data_type": "String", + "expression": { + "expression": "parent", + "type": "expression" + }, + "new_name": "salary_slip", + "type": "mutate" + }, + { + "column_names": [ + "salary_slip", + "salary_component", + "start_date", + "company", + "department", + "designation", + "amount" + ], + "type": "select" + } + ], + "sort_order": 8, + "title": "Earnings by Component, 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" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Integer", + "expression": { + "expression": "count_if(start_date >= date_sub(month_start(today()), 1, 'month'))", + "type": "expression" + }, + "measure_name": "employees_paid" + }, + { + "data_type": "Integer", + "expression": { + "expression": "count_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'))", + "type": "expression" + }, + "measure_name": "employees_paid_last_year" + } + ], + "type": "summarize" + } + ], + "sort_order": 3, + "title": "Employees Paid, Last Month", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-pay-change-year-over-year": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-pay-change-year-over-year", + "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" + } + ], + "sort_order": 9, + "title": "Pay Change, Year over Year", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-payroll-12-months": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-payroll-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" + } + ], + "sort_order": 6, + "title": "Payroll, 12 Months", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-payroll-cost-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-payroll-cost-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" + }, + { + "dimensions": [], + "measures": [ + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay)", + "type": "expression" + }, + "format": "currency", + "measure_name": "payroll_cost" + }, + { + "data_type": "Decimal", + "expression": { + "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", + "type": "expression" + }, + "format": "currency", + "measure_name": "payroll_cost_last_year" + } + ], + "type": "summarize" + } + ], + "sort_order": 2, + "title": "Payroll Cost, Last Month", + "use_live_connection": 1, + "workbook": "payroll" + }, + "payroll-payroll-last-month": { + "folder": null, + "is_builder_query": 1, + "is_native_query": 0, + "is_script_query": 0, + "name": "payroll-payroll-last-month", + "operations": [ + { + "table": { + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" + }, + "type": "source" + }, + { + "filters": [ + { + "expression": { + "expression": "start_date.between(date_sub(month_start(today()), 1, 'month'), date_sub(month_start(today()), 1, 'day'))", + "type": "expression" + } + } + ], + "logical_operator": "And", + "type": "filter_group" + } + ], + "sort_order": 7, + "title": "Payroll, Last Month", + "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": "Decimal", + "expression": { + "expression": "total_working_days - payment_days", + "type": "expression" + }, + "new_name": "unpaid_days", + "type": "mutate" + }, + { + "column_names": [ + "name", + "employee", + "employee_name", + "start_date", + "posting_date", + "company", + "department", + "designation", + "salary_structure", + "total_working_days", + "payment_days", + "unpaid_days", + "gross_pay", + "total_deduction", + "net_pay" + ], + "type": "select" + } + ], + "sort_order": 1, + "title": "Salary Slips", + "use_live_connection": 1, + "workbook": "payroll" + } + }, + "title": "Payroll" +} From d60b8feb722789ef11324c41346ad30bea8bb448 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Sat, 19 Sep 2026 19:08:47 +0530 Subject: [PATCH 2/8] feat: point the dashboard sidebar items at the Insights dashboards --- hrms/expenses/sidebar/expenses/expenses.json | 7 ++++--- hrms/hr_setup/sidebar/hr_setup/hr_setup.json | 7 ++++--- hrms/payroll/sidebar/payroll/payroll.json | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hrms/expenses/sidebar/expenses/expenses.json b/hrms/expenses/sidebar/expenses/expenses.json index 90ced4ec51b..f09c8dd14df 100644 --- a/hrms/expenses/sidebar/expenses/expenses.json +++ b/hrms/expenses/sidebar/expenses/expenses.json @@ -25,8 +25,9 @@ "indent": 0, "keep_closed": 0, "label": "Dashboard", - "link_to": "Expense Claims", - "link_type": "Dashboard", + "link_to": "insights-dashboard", + "link_type": "Page", + "route": "expense-claims", "show_arrow": 0, "type": "Link" }, @@ -268,7 +269,7 @@ "type": "Link" } ], - "modified": "2026-08-07 12:00:00.000000", + "modified": "2026-09-19 21:30:00.000000", "modified_by": "Administrator", "module": "Expenses", "name": "Expenses", diff --git a/hrms/hr_setup/sidebar/hr_setup/hr_setup.json b/hrms/hr_setup/sidebar/hr_setup/hr_setup.json index cabde9a1f90..a57855f7fcb 100644 --- a/hrms/hr_setup/sidebar/hr_setup/hr_setup.json +++ b/hrms/hr_setup/sidebar/hr_setup/hr_setup.json @@ -25,8 +25,9 @@ "indent": 0, "keep_closed": 0, "label": "Dashboard", - "link_to": "Human Resource", - "link_type": "Dashboard", + "link_to": "insights-dashboard", + "link_type": "Page", + "route": "human-resource", "show_arrow": 0, "type": "Link" }, @@ -148,7 +149,7 @@ "url": "/desk/hr-settings#employee_tab" } ], - "modified": "2026-08-13 20:00:00.000000", + "modified": "2026-09-19 21:30:00.000000", "modified_by": "Administrator", "module": "HR Setup", "name": "HR Setup", diff --git a/hrms/payroll/sidebar/payroll/payroll.json b/hrms/payroll/sidebar/payroll/payroll.json index 42cab32e659..98b704a9b3e 100644 --- a/hrms/payroll/sidebar/payroll/payroll.json +++ b/hrms/payroll/sidebar/payroll/payroll.json @@ -26,9 +26,10 @@ "indent": 0, "keep_closed": 0, "label": "Dashboard", - "link_to": "Payroll", - "link_type": "Dashboard", + "link_to": "insights-dashboard", + "link_type": "Page", "open_in_new_tab": 1, + "route": "payroll", "show_arrow": 0, "type": "Link" }, @@ -238,7 +239,7 @@ "type": "Link" } ], - "modified": "2026-08-07 12:00:00.000000", + "modified": "2026-09-19 21:30:00.000000", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll", From 723777b1beb1b57ec998d03a12d50efea2d90018 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Sep 2026 12:15:52 +0530 Subject: [PATCH 3/8] feat: rebuild the dashboards on HRMS's report logic and vocabulary, and add Attendance --- .../attendance/attendance.json | 904 ++++++++++ .../expense_claims/expense_claims.json | 1352 +++++++------- .../human_resource/human_resource.json | 1565 ----------------- .../human_resource/human_resource.json | 1281 ++++++++++++++ .../insights_workbook/payroll/payroll.json | 1351 +++++++------- 5 files changed, 3557 insertions(+), 2896 deletions(-) create mode 100644 hrms/hr/insights_workbook/attendance/attendance.json delete mode 100644 hrms/hr/insights_workbook/human_resource/human_resource.json create mode 100644 hrms/hr_setup/insights_workbook/human_resource/human_resource.json 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 index 7e511d87e2c..5bfb80b90aa 100644 --- a/hrms/hr/insights_workbook/expense_claims/expense_claims.json +++ b/hrms/hr/insights_workbook/expense_claims/expense_claims.json @@ -1,101 +1,6 @@ { "charts": { - "expense-claims-advances-by-status": { - "chart_type": "Bar", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_format": { - "decimals": 1, - "shorten": true - }, - "order_by": [ - { - "column": { - "column_name": "Advance Value", - "type": "column" - }, - "direction": "desc" - } - ], - "x_axis": { - "dimension": { - "column_name": "status", - "data_type": "String", - "dimension_name": "Status" - } - }, - "y_axis": { - "min": 0, - "series": [ - { - "measure": { - "aggregation": "sum", - "column_name": "advance_amount", - "data_type": "Decimal", - "format": "currency", - "measure_name": "Advance Value" - }, - "type": "bar" - } - ] - } - }, - "folder": null, - "name": "expense-claims-advances-by-status", - "query": "expense-claims-employee-advances", - "sort_order": 10, - "title": "Advances by Status", - "workbook": "expense-claims" - }, - "expense-claims-claims-filed": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs prior 3 months", - "measure": { - "aggregation": "max", - "column_name": "claims_filed_prior", - "data_type": "Integer", - "measure_name": "Prior 3 Months" - }, - "show": "change", - "source": "measure" - }, - "decimals": 0, - "shorten": false - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "claims_filed", - "data_type": "Integer", - "id": "Claims Filed, 3 Months", - "measure_name": "Claims Filed, 3 Months" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "expense-claims-claims-filed", - "query": "expense-claims-claims-filed-3-months", - "sort_order": 2, - "title": "Claims Filed", - "workbook": "expense-claims" - }, - "expense-claims-days-to-reimburse": { + "expense-claims-advances-outstanding": { "chart_type": "Number", "config": { "filters": { @@ -105,192 +10,99 @@ "limit": 100, "number_column_options": [ { - "comparison": { - "label": "vs prior 3 months", - "measure": { - "aggregation": "max", - "column_name": "days_to_reimburse_prior", - "data_type": "Decimal", - "measure_name": "Prior 3 Months" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 1, - "shorten": false, - "suffix": " days" - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "days_to_reimburse", - "data_type": "Decimal", - "id": "Days to Reimburse", - "measure_name": "Days to Reimburse" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "expense-claims-days-to-reimburse", - "query": "expense-claims-days-to-reimburse-3-months", - "sort_order": 4, - "title": "Days to Reimburse", - "workbook": "expense-claims" - }, - "expense-claims-outstanding-advances-2": { - "chart_type": "Table", - "config": { - "columns": [], - "conditional_formatting": { - "columns": [], - "formats": [ - { - "color": "red", - "column": { - "column_name": "Days Outstanding", - "type": "column" - }, - "mode": "cell_rules", - "operator": ">", - "value": 60 - } - ] - }, - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 10, - "number_formats": { - "Advanced": { - "decimals": 1, - "shorten": true - }, - "Unclaimed": { "decimals": 1, "shorten": true - } - }, - "order_by": [ - { - "column": { - "column_name": "Unclaimed", - "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": "department", - "data_type": "String", - "dimension_name": "Department" + "decimals": 0, + "shorten": false } ], - "values": [ - { - "data_type": "Decimal", - "expression": { - "expression": "sum(unclaimed_amount)", - "type": "expression" - }, - "format": "currency", - "measure_name": "Unclaimed" - }, + "number_columns": [ { + "aggregation": "sum", + "column_name": "outstanding", "data_type": "Decimal", - "expression": { - "expression": "sum(paid_amount)", - "type": "expression" - }, "format": "currency", - "measure_name": "Advanced" + "id": "Advances Outstanding", + "measure_name": "Unclaimed Advances" }, { - "aggregation": "max", - "column_name": "days_outstanding", + "aggregation": "count", + "column_name": "name", "data_type": "Integer", - "measure_name": "Days Outstanding" + "id": "Advances", + "measure_name": "Advance Count" } - ] + ], + "order_by": [], + "sparkline": false }, "folder": null, - "name": "expense-claims-outstanding-advances-2", + "name": "expense-claims-advances-outstanding", "query": "expense-claims-outstanding-advances", - "sort_order": 11, - "title": "Outstanding Advances", + "sort_order": 4, + "title": "Unclaimed Advances", "workbook": "expense-claims" }, - "expense-claims-reimbursement-turnaround": { - "chart_type": "Line", + "expense-claims-advances-outstanding-by-employee": { + "chart_type": "Row", "config": { "filters": { "filters": [], "logical_operator": "And" }, - "limit": 100, + "limit": 10, "number_format": { "decimals": 1, - "shorten": false, - "suffix": " days" + "shorten": true }, "order_by": [ { "column": { - "column_name": "Month", + "column_name": "Unclaimed Amount", "type": "column" }, - "direction": "asc" + "direction": "desc" } ], "x_axis": { "dimension": { - "column_name": "clearance_date", - "data_type": "Date", - "dimension_name": "Month", - "granularity": "month" + "column_name": "employee_name", + "data_type": "String", + "dimension_name": "Employee" } }, "y_axis": { - "min": 0, "series": [ { "measure": { - "aggregation": "avg", - "column_name": "days_to_reimburse", + "aggregation": "sum", + "column_name": "outstanding", "data_type": "Decimal", - "measure_name": "Days to Reimburse" + "format": "currency", + "measure_name": "Unclaimed Amount" }, - "show_data_points": true, - "smooth": true, - "type": "line" + "type": "bar" } ] } }, "folder": null, - "name": "expense-claims-reimbursement-turnaround", - "query": "expense-claims-reimbursed-12-months", - "sort_order": 6, - "title": "Reimbursement Turnaround", + "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-rejection-rate": { + "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" @@ -299,42 +111,38 @@ "number_column_options": [ { "comparison": { - "label": "vs prior 3 months", - "measure": { - "aggregation": "max", - "column_name": "rejection_rate_prior", - "data_type": "Decimal", - "format": "percent", - "measure_name": "Prior 3 Months" - }, - "show": "delta", - "source": "measure" + "label": "vs last FY", + "show": "change", + "source": "last year" }, "decimals": 1, - "shorten": false + "shorten": true } ], "number_columns": [ { - "aggregation": "max", - "column_name": "rejection_rate", + "aggregation": "sum", + "column_name": "base_total_sanctioned_amount", "data_type": "Decimal", - "format": "percent", - "id": "Rejection Rate, 3 Months", - "measure_name": "Rejection Rate, 3 Months" + "format": "currency", + "id": "Approved Expenses", + "measure_name": "Sanctioned Amount (This FY)" } ], "order_by": [], - "sparkline": false + "sparkline": false, + "window": { + "span": "fiscal year to date" + } }, "folder": null, - "name": "expense-claims-rejection-rate", - "query": "expense-claims-rejection-rate-3-months", - "sort_order": 3, - "title": "Rejection Rate", + "name": "expense-claims-approved-expenses", + "query": "expense-claims-approved-claims", + "sort_order": 1, + "title": "Sanctioned Amount", "workbook": "expense-claims" }, - "expense-claims-sanctioned-by-department": { + "expense-claims-approved-expenses-by-department": { "chart_type": "Row", "config": { "filters": { @@ -349,7 +157,7 @@ "order_by": [ { "column": { - "column_name": "Sanctioned", + "column_name": "Sanctioned Amount", "type": "column" }, "direction": "desc" @@ -370,7 +178,7 @@ "column_name": "base_total_sanctioned_amount", "data_type": "Decimal", "format": "currency", - "measure_name": "Sanctioned" + "measure_name": "Sanctioned Amount" }, "type": "bar" } @@ -378,49 +186,63 @@ } }, "folder": null, - "name": "expense-claims-sanctioned-by-department", - "query": "expense-claims-sanctioned-12-months", - "sort_order": 8, - "title": "Sanctioned by Department", + "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-sanctioned-by-expense-type": { - "chart_type": "Donut", + "expense-claims-approved-expenses-by-expense-type": { + "chart_type": "Row", "config": { "filters": { "filters": [], "logical_operator": "And" }, - "label_column": { - "column_name": "expense_type", - "data_type": "String", - "dimension_name": "Expense Type" - }, - "legend_position": "right", - "limit": 100, - "max_slices": 6, + "limit": 8, "number_format": { "decimals": 1, "shorten": true }, - "order_by": [], - "show_inline_labels": true, - "value_column": { - "aggregation": "sum", - "column_name": "base_sanctioned_amount", - "data_type": "Decimal", - "format": "currency", - "measure_name": "Sanctioned" + "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-sanctioned-by-expense-type", - "query": "expense-claims-claim-lines-12-months", - "sort_order": 7, - "title": "Sanctioned by Expense Type", + "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-sanctioned-by-month": { + "expense-claims-approved-expenses-by-month": { "chart_type": "Bar", "config": { "filters": { @@ -456,9 +278,9 @@ "aggregate": "average", "axis": "y", "dashed": true, - "id": "779d29c4", + "id": "4e12c5fe", "label": "12-month average", - "measure_name": "Sanctioned" + "measure_name": "Sanctioned Amount" } ], "series": [ @@ -468,7 +290,7 @@ "column_name": "base_total_sanctioned_amount", "data_type": "Decimal", "format": "currency", - "measure_name": "Sanctioned" + "measure_name": "Sanctioned Amount" }, "type": "bar" } @@ -476,13 +298,13 @@ } }, "folder": null, - "name": "expense-claims-sanctioned-by-month", - "query": "expense-claims-sanctioned-12-months", + "name": "expense-claims-approved-expenses-by-month", + "query": "expense-claims-approved-claims-12-months", "sort_order": 5, - "title": "Sanctioned by Month", + "title": "Sanctioned Amount by Month", "workbook": "expense-claims" }, - "expense-claims-sanctioned-this-month-2": { + "expense-claims-awaiting-approval-2": { "chart_type": "Number", "config": { "filters": { @@ -492,43 +314,42 @@ "limit": 100, "number_column_options": [ { - "comparison": { - "label": "vs last month", - "measure": { - "aggregation": "max", - "column_name": "sanctioned_last_month", - "data_type": "Decimal", - "format": "currency", - "measure_name": "Same Days Last Month" - }, - "show": "change", - "source": "measure" - }, + "decimals": 0, + "shorten": false + }, + { "decimals": 1, "shorten": true } ], "number_columns": [ { - "aggregation": "max", - "column_name": "sanctioned_mtd", + "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": "Sanctioned This Month", - "measure_name": "Sanctioned This Month" + "id": "Claimed", + "measure_name": "Claimed Amount" } ], "order_by": [], "sparkline": false }, "folder": null, - "name": "expense-claims-sanctioned-this-month-2", - "query": "expense-claims-sanctioned-this-month", - "sort_order": 1, - "title": "Sanctioned This Month", + "name": "expense-claims-awaiting-approval-2", + "query": "expense-claims-awaiting-approval", + "sort_order": 2, + "title": "Awaiting Approval", "workbook": "expense-claims" }, - "expense-claims-unpaid-claims-2": { + "expense-claims-outstanding-advances-2": { "chart_type": "Table", "config": { "columns": [], @@ -538,22 +359,12 @@ { "color": "red", "column": { - "column_name": "Days Open", + "column_name": "Age (Days)", "type": "column" }, "mode": "cell_rules", "operator": ">", - "value": 30 - }, - { - "color": "amber", - "column": { - "column_name": "Amount Due", - "type": "column" - }, - "mode": "rank_rules", - "operator": "top_n", - "value": 3 + "value": 60 } ] }, @@ -563,7 +374,23 @@ }, "limit": 10, "number_formats": { - "Amount Due": { + "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 } @@ -571,7 +398,7 @@ "order_by": [ { "column": { - "column_name": "Days Open", + "column_name": "Unclaimed Amount", "type": "column" }, "direction": "desc" @@ -581,7 +408,7 @@ { "column_name": "name", "data_type": "String", - "dimension_name": "Claim" + "dimension_name": "Advance" }, { "column_name": "employee_name", @@ -589,42 +416,223 @@ "dimension_name": "Employee" }, { - "column_name": "department", + "column_name": "purpose", "data_type": "String", - "dimension_name": "Department" + "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(base_grand_total)", + "expression": "sum_if(days_since_posting > 30, outstanding)", "type": "expression" }, "format": "currency", - "measure_name": "Amount Due" + "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_filed", + "column_name": "days_since_posting", "data_type": "Integer", - "measure_name": "Days Open" + "measure_name": "Age (Days)" } ] }, "folder": null, - "name": "expense-claims-unpaid-claims-2", - "query": "expense-claims-unpaid-claims", + "name": "expense-claims-unpaid-claims", + "query": "expense-claims-owed-to-employees", "sort_order": 9, "title": "Unpaid Claims", "workbook": "expense-claims" } }, - "creation": "2026-09-19 18:40:22.605032", + "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": { @@ -643,17 +651,16 @@ } }, "links": { - "expense-claims-advances-by-status": "`expense-claims-employee-advances`.`company`", - "expense-claims-claims-filed": "`expense-claims-expense-claims`.`company`", - "expense-claims-days-to-reimburse": "`expense-claims-expense-claims`.`company`", + "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-reimbursement-turnaround": "`expense-claims-reimbursed-12-months`.`company`", - "expense-claims-rejection-rate": "`expense-claims-expense-claims`.`company`", - "expense-claims-sanctioned-by-department": "`expense-claims-sanctioned-12-months`.`company`", - "expense-claims-sanctioned-by-expense-type": "`expense-claims-claim-lines-12-months`.`company`", - "expense-claims-sanctioned-by-month": "`expense-claims-sanctioned-12-months`.`company`", - "expense-claims-sanctioned-this-month-2": "`expense-claims-expense-claims`.`company`", - "expense-claims-unpaid-claims-2": "`expense-claims-unpaid-claims`.`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" }, @@ -676,25 +683,24 @@ } }, "links": { - "expense-claims-advances-by-status": "`expense-claims-employee-advances`.`department`", - "expense-claims-claims-filed": "`expense-claims-expense-claims`.`department`", - "expense-claims-days-to-reimburse": "`expense-claims-expense-claims`.`department`", + "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-reimbursement-turnaround": "`expense-claims-reimbursed-12-months`.`department`", - "expense-claims-rejection-rate": "`expense-claims-expense-claims`.`department`", - "expense-claims-sanctioned-by-department": "`expense-claims-sanctioned-12-months`.`department`", - "expense-claims-sanctioned-by-expense-type": "`expense-claims-claim-lines-12-months`.`department`", - "expense-claims-sanctioned-by-month": "`expense-claims-sanctioned-12-months`.`department`", - "expense-claims-sanctioned-this-month-2": "`expense-claims-expense-claims`.`department`", - "expense-claims-unpaid-claims-2": "`expense-claims-unpaid-claims`.`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-sanctioned-this-month-2", + "chart": "expense-claims-approved-expenses", "layout": { "h": 5, - "i": "chart-obi9q21nc0", + "i": "chart-3mjo2dkqoa", "w": 5, "x": 0, "y": 3 @@ -710,17 +716,17 @@ "type": "chart" }, { - "chart": "expense-claims-claims-filed", + "chart": "expense-claims-awaiting-approval-2", "layout": { - "h": 5, - "i": "chart-obiu2j0659", + "h": 4, + "i": "chart-3mjnkeqk12", "w": 5, "x": 5, "y": 3 }, "layouts": { "sm": { - "h": 5, + "h": 4, "w": 10, "x": 0, "y": 8 @@ -729,17 +735,17 @@ "type": "chart" }, { - "chart": "expense-claims-rejection-rate", + "chart": "expense-claims-owed-to-employees-2", "layout": { - "h": 5, - "i": "chart-obie29u4b3", + "h": 4, + "i": "chart-3mjenff8uk", "w": 5, "x": 10, "y": 3 }, "layouts": { "sm": { - "h": 5, + "h": 4, "w": 10, "x": 10, "y": 8 @@ -748,29 +754,29 @@ "type": "chart" }, { - "chart": "expense-claims-days-to-reimburse", + "chart": "expense-claims-advances-outstanding", "layout": { - "h": 5, - "i": "chart-obi4m7u5k7", + "h": 4, + "i": "chart-3mj7faq4q7", "w": 5, "x": 15, "y": 3 }, "layouts": { "sm": { - "h": 5, + "h": 4, "w": 10, "x": 0, - "y": 13 + "y": 12 } }, "type": "chart" }, { - "chart": "expense-claims-sanctioned-by-month", + "chart": "expense-claims-approved-expenses-by-month", "layout": { "h": 17, - "i": "chart-obis0c3mor", + "i": "chart-3mj46m4ue9", "w": 10, "x": 0, "y": 8 @@ -780,16 +786,16 @@ "h": 17, "w": 20, "x": 0, - "y": 18 + "y": 17 } }, "type": "chart" }, { - "chart": "expense-claims-reimbursement-turnaround", + "chart": "expense-claims-approved-expenses-by-expense-type", "layout": { "h": 17, - "i": "chart-obi8jh3nho", + "i": "chart-3mj4soms72", "w": 10, "x": 10, "y": 8 @@ -799,83 +805,64 @@ "h": 17, "w": 20, "x": 0, - "y": 35 + "y": 34 } }, "type": "chart" }, { - "chart": "expense-claims-sanctioned-by-expense-type", + "chart": "expense-claims-approved-expenses-by-department", "layout": { - "h": 17, - "i": "chart-obiujrb42u", + "h": 19, + "i": "chart-3mjdqrti83", "w": 10, "x": 0, "y": 25 }, "layouts": { "sm": { - "h": 17, + "h": 19, "w": 20, "x": 0, - "y": 52 + "y": 51 } }, "type": "chart" }, { - "chart": "expense-claims-sanctioned-by-department", + "chart": "expense-claims-unpaid-claims", "layout": { - "h": 17, - "i": "chart-obink1fa4o", + "h": 19, + "i": "chart-3mjrbmah18", "w": 10, "x": 10, "y": 25 }, - "layouts": { - "sm": { - "h": 19, - "w": 20, - "x": 0, - "y": 69 - } - }, - "type": "chart" - }, - { - "chart": "expense-claims-unpaid-claims-2", - "layout": { - "h": 19, - "i": "chart-obiundvd7t", - "w": 20, - "x": 0, - "y": 42 - }, "layouts": { "sm": { "h": 24, "w": 20, "x": 0, - "y": 88 + "y": 70 } }, "type": "chart" }, { - "chart": "expense-claims-advances-by-status", + "chart": "expense-claims-advances-outstanding-by-employee", "layout": { - "h": 17, - "i": "chart-obivqm3nvp", + "h": 19, + "i": "chart-3mj09g0ldv", "w": 10, "x": 0, - "y": 61 + "y": 44 }, "layouts": { "sm": { - "h": 17, + "h": 19, "w": 20, "x": 0, - "y": 112 + "y": 94 } }, "type": "chart" @@ -884,17 +871,17 @@ "chart": "expense-claims-outstanding-advances-2", "layout": { "h": 19, - "i": "chart-obika8b2vb", + "i": "chart-3mjistpv6v", "w": 10, "x": 10, - "y": 61 + "y": 44 }, "layouts": { "sm": { "h": 24, "w": 20, "x": 0, - "y": 129 + "y": 113 } }, "type": "chart" @@ -903,6 +890,11 @@ "name": "expense-claims", "title": "Expense Claims", "vertical_compact_layout": 1, + "visible_to_roles": [ + { + "role": "Expense Approver" + } + ], "workbook": "expense-claims" } }, @@ -911,18 +903,18 @@ "folders": [], "idx": 0, "is_standard": 1, - "modified": "2026-09-19 19:02:24.567732", + "modified": "2026-09-28 12:09:41.857891", "modified_by": "Administrator", "module": "HR", "name": "expense-claims", "owner": "Administrator", "queries": { - "expense-claims-claim-lines-12-months": { + "expense-claims-approved-claim-lines-fiscal-year": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "expense-claims-claim-lines-12-months", + "name": "expense-claims-approved-claim-lines-fiscal-year", "operations": [ { "table": { @@ -963,6 +955,10 @@ "column_name": "posting_date", "type": "column" }, + { + "column_name": "employee_name", + "type": "column" + }, { "column_name": "department", "type": "column" @@ -993,7 +989,7 @@ }, { "expression": { - "expression": "posting_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "expression": "posting_date.between(fiscal_year_start(today()), today())", "type": "expression" } } @@ -1013,40 +1009,49 @@ { "column_names": [ "expense_claim", - "posting_date", - "department", - "company", "expense_type", - "base_sanctioned_amount" + "expense_date", + "employee_name", + "base_sanctioned_amount", + "department", + "company" ], "type": "select" } ], - "sort_order": 2, - "title": "Claim Lines, 12 Months", + "sort_order": 4, + "title": "Approved Claim Lines, Fiscal Year", "use_live_connection": 1, "workbook": "expense-claims" }, - "expense-claims-claims-filed-3-months": { + "expense-claims-approved-claims": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "expense-claims-claims-filed-3-months", + "name": "expense-claims-approved-claims", "operations": [ { "table": { - "query_name": "expense-claims-expense-claims", - "type": "query", - "workbook": "expense-claims" + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" }, "type": "source" }, { "filters": [ + { + "column": { + "column_name": "docstatus", + "type": "column" + }, + "operator": "=", + "value": 1 + }, { "expression": { - "expression": "posting_date.between(date_sub(month_start(today()), 6, 'month'), date_sub(month_start(today()), 1, 'day'))", + "expression": "approval_status == 'Approved'", "type": "expression" } } @@ -1055,43 +1060,33 @@ "type": "filter_group" }, { - "dimensions": [], - "measures": [ - { - "data_type": "Integer", - "expression": { - "expression": "count_if(posting_date >= date_sub(month_start(today()), 3, 'month'))", - "type": "expression" - }, - "measure_name": "claims_filed" - }, - { - "data_type": "Integer", - "expression": { - "expression": "count_if(posting_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day'))", - "type": "expression" - }, - "measure_name": "claims_filed_prior" - } + "column_names": [ + "name", + "posting_date", + "employee_name", + "department", + "company", + "base_total_claimed_amount", + "base_total_sanctioned_amount" ], - "type": "summarize" + "type": "select" } ], - "sort_order": 5, - "title": "Claims Filed, 3 Months", + "sort_order": 1, + "title": "Approved Claims", "use_live_connection": 1, "workbook": "expense-claims" }, - "expense-claims-days-to-reimburse-3-months": { + "expense-claims-approved-claims-12-months": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "expense-claims-days-to-reimburse-3-months", + "name": "expense-claims-approved-claims-12-months", "operations": [ { "table": { - "query_name": "expense-claims-expense-claims", + "query_name": "expense-claims-approved-claims", "type": "query", "workbook": "expense-claims" }, @@ -1101,118 +1096,59 @@ "filters": [ { "expression": { - "expression": "clearance_date.between(date_sub(month_start(today()), 6, 'month'), date_sub(month_start(today()), 1, 'day'))", + "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" - }, - { - "dimensions": [], - "measures": [ - { - "data_type": "Decimal", - "expression": { - "expression": "avg(days_to_reimburse, clearance_date >= date_sub(month_start(today()), 3, 'month'))", - "type": "expression" - }, - "measure_name": "days_to_reimburse" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "avg(days_to_reimburse, clearance_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day'))", - "type": "expression" - }, - "measure_name": "days_to_reimburse_prior" - } - ], - "type": "summarize" } ], - "sort_order": 7, - "title": "Days to Reimburse, 3 Months", + "sort_order": 2, + "title": "Approved Claims, 12 Months", "use_live_connection": 1, "workbook": "expense-claims" }, - "expense-claims-employee-advances": { + "expense-claims-approved-claims-fiscal-year": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "expense-claims-employee-advances", + "name": "expense-claims-approved-claims-fiscal-year", "operations": [ { "table": { - "data_source": "Site DB", - "table_name": "tabEmployee Advance", - "type": "table" + "query_name": "expense-claims-approved-claims", + "type": "query", + "workbook": "expense-claims" }, "type": "source" }, { "filters": [ { - "column": { - "column_name": "docstatus", - "type": "column" - }, - "operator": "<", - "value": 2 + "expression": { + "expression": "posting_date.between(fiscal_year_start(today()), today())", + "type": "expression" + } } ], "logical_operator": "And", "type": "filter_group" - }, - { - "column_names": [ - "name", - "posting_date", - "employee", - "employee_name", - "department", - "company", - "purpose", - "status", - "advance_amount", - "paid_amount", - "claimed_amount", - "return_amount" - ], - "type": "select" - }, - { - "data_type": "Integer", - "expression": { - "expression": "date_diff(today(), posting_date, 'day')", - "type": "expression" - }, - "new_name": "days_outstanding", - "type": "mutate" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "paid_amount - claimed_amount - return_amount", - "type": "expression" - }, - "new_name": "unclaimed_amount", - "type": "mutate" } ], "sort_order": 3, - "title": "Employee Advances", + "title": "Approved Claims, Fiscal Year", "use_live_connection": 1, "workbook": "expense-claims" }, - "expense-claims-expense-claims": { + "expense-claims-awaiting-approval": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "expense-claims-expense-claims", + "name": "expense-claims-awaiting-approval", "operations": [ { "table": { @@ -1229,52 +1165,46 @@ "column_name": "docstatus", "type": "column" }, - "operator": "<", - "value": 2 + "operator": "=", + "value": 0 + }, + { + "column": { + "column_name": "approval_status", + "type": "column" + }, + "operator": "=", + "value": "Draft" } ], "logical_operator": "And", "type": "filter_group" }, - { - "column_names": [ - "name", - "posting_date", - "clearance_date", - "employee", - "employee_name", - "department", - "company", - "approval_status", - "status", - "base_total_claimed_amount", - "base_total_sanctioned_amount", - "base_grand_total", - "base_total_advance_amount" - ], - "type": "select" - }, { "data_type": "Integer", "expression": { "expression": "date_diff(today(), posting_date, 'day')", "type": "expression" }, - "new_name": "days_since_filed", + "new_name": "days_waiting", "type": "mutate" }, { - "data_type": "Integer", - "expression": { - "expression": "date_diff(clearance_date, posting_date, 'day')", - "type": "expression" - }, - "new_name": "days_to_reimburse", - "type": "mutate" + "column_names": [ + "name", + "posting_date", + "employee_name", + "expense_approver", + "base_total_claimed_amount", + "days_waiting", + "department", + "company" + ], + "type": "select" } ], - "sort_order": 1, - "title": "Expense Claims", + "sort_order": 5, + "title": "Awaiting Approval", "use_live_connection": 1, "workbook": "expense-claims" }, @@ -1287,9 +1217,9 @@ "operations": [ { "table": { - "query_name": "expense-claims-employee-advances", - "type": "query", - "workbook": "expense-claims" + "data_source": "Site DB", + "table_name": "tabEmployee Advance", + "type": "table" }, "type": "source" }, @@ -1297,240 +1227,210 @@ "filters": [ { "column": { - "column_name": "unclaimed_amount", + "column_name": "docstatus", "type": "column" }, - "operator": ">", - "value": 0 + "operator": "=", + "value": 1 } ], "logical_operator": "And", "type": "filter_group" - } - ], - "sort_order": 11, - "title": "Outstanding Advances", - "use_live_connection": 1, - "workbook": "expense-claims" - }, - "expense-claims-reimbursed-12-months": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "expense-claims-reimbursed-12-months", - "operations": [ + }, { - "table": { - "query_name": "expense-claims-expense-claims", - "type": "query", - "workbook": "expense-claims" + "data_type": "Decimal", + "expression": { + "expression": "paid_amount - claimed_amount - return_amount", + "type": "expression" }, - "type": "source" + "new_name": "unclaimed", + "type": "mutate" }, { "filters": [ { - "expression": { - "expression": "clearance_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", - "type": "expression" - } + "column": { + "column_name": "unclaimed", + "type": "column" + }, + "operator": ">", + "value": 0 } ], "logical_operator": "And", "type": "filter_group" - } - ], - "sort_order": 9, - "title": "Reimbursed, 12 Months", - "use_live_connection": 1, - "workbook": "expense-claims" - }, - "expense-claims-rejection-rate-3-months": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "expense-claims-rejection-rate-3-months", - "operations": [ + }, { - "table": { - "query_name": "expense-claims-expense-claims", - "type": "query", - "workbook": "expense-claims" + "data_type": "Decimal", + "expression": { + "expression": "base_paid_amount / paid_amount", + "type": "expression" }, - "type": "source" + "new_name": "rate", + "type": "mutate" }, { - "filters": [ - { - "expression": { - "expression": "posting_date.between(date_sub(month_start(today()), 6, 'month'), date_sub(month_start(today()), 1, 'day'))", - "type": "expression" - } - } - ], - "logical_operator": "And", - "type": "filter_group" + "data_type": "Decimal", + "expression": { + "expression": "base_paid_amount", + "type": "expression" + }, + "new_name": "paid", + "type": "mutate" }, { - "dimensions": [], - "measures": [ - { - "data_type": "Decimal", - "expression": { - "expression": "count_if((posting_date >= date_sub(month_start(today()), 3, 'month')) & (approval_status == 'Rejected')) / count_if((posting_date >= date_sub(month_start(today()), 3, 'month')) & (approval_status != 'Draft'))", - "type": "expression" - }, - "format": "percent", - "measure_name": "rejection_rate" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "count_if((posting_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day')) & (approval_status == 'Rejected')) / count_if((posting_date <= date_sub(date_sub(month_start(today()), 3, 'month'), 1, 'day')) & (approval_status != 'Draft'))", - "type": "expression" - }, - "format": "percent", - "measure_name": "rejection_rate_prior" - } - ], - "type": "summarize" - } - ], - "sort_order": 6, - "title": "Rejection Rate, 3 Months", - "use_live_connection": 1, - "workbook": "expense-claims" - }, - "expense-claims-sanctioned-12-months": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "expense-claims-sanctioned-12-months", - "operations": [ + "data_type": "Decimal", + "expression": { + "expression": "claimed_amount * rate", + "type": "expression" + }, + "new_name": "claimed", + "type": "mutate" + }, { - "table": { - "query_name": "expense-claims-expense-claims", - "type": "query", - "workbook": "expense-claims" + "data_type": "Decimal", + "expression": { + "expression": "return_amount * rate", + "type": "expression" }, - "type": "source" + "new_name": "returned", + "type": "mutate" }, { - "filters": [ - { - "expression": { - "expression": "approval_status == 'Approved'", - "type": "expression" - } - }, - { - "expression": { - "expression": "posting_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", - "type": "expression" - } - } + "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" ], - "logical_operator": "And", - "type": "filter_group" + "type": "select" } ], - "sort_order": 8, - "title": "Sanctioned, 12 Months", + "sort_order": 7, + "title": "Outstanding Advances", "use_live_connection": 1, "workbook": "expense-claims" }, - "expense-claims-sanctioned-this-month": { + "expense-claims-owed-to-employees": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "expense-claims-sanctioned-this-month", + "name": "expense-claims-owed-to-employees", "operations": [ { "table": { - "query_name": "expense-claims-expense-claims", - "type": "query", - "workbook": "expense-claims" + "data_source": "Site DB", + "table_name": "tabExpense Claim", + "type": "table" }, "type": "source" }, { "filters": [ { - "expression": { - "expression": "posting_date.between(date_sub(month_start(today()), 1, 'month'), today())", - "type": "expression" - } - } - ], - "logical_operator": "And", - "type": "filter_group" - }, - { - "dimensions": [], - "measures": [ - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if((posting_date >= month_start(today())) & (approval_status == 'Approved'), base_total_sanctioned_amount)", - "type": "expression" + "column": { + "column_name": "docstatus", + "type": "column" }, - "format": "currency", - "measure_name": "sanctioned_mtd" + "operator": "=", + "value": 1 }, { - "data_type": "Decimal", - "expression": { - "expression": "sum_if((posting_date <= date_sub(today(), 1, 'month')) & (approval_status == 'Approved'), base_total_sanctioned_amount)", - "type": "expression" + "column": { + "column_name": "total_sanctioned_amount", + "type": "column" }, - "format": "currency", - "measure_name": "sanctioned_last_month" + "operator": ">", + "value": 0 } ], - "type": "summarize" - } - ], - "sort_order": 4, - "title": "Sanctioned This Month", - "use_live_connection": 1, - "workbook": "expense-claims" - }, - "expense-claims-unpaid-claims": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "expense-claims-unpaid-claims", - "operations": [ + "logical_operator": "And", + "type": "filter_group" + }, { - "table": { - "query_name": "expense-claims-expense-claims", - "type": "query", - "workbook": "expense-claims" + "data_type": "Decimal", + "expression": { + "expression": "total_amount_reimbursed * exchange_rate", + "type": "expression" }, - "type": "source" + "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": "status", + "column_name": "outstanding", "type": "column" }, - "operator": "=", - "value": "Unpaid" + "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": 10, - "title": "Unpaid Claims", + "sort_order": 6, + "title": "Owed to Employees", "use_live_connection": 1, "workbook": "expense-claims" } diff --git a/hrms/hr/insights_workbook/human_resource/human_resource.json b/hrms/hr/insights_workbook/human_resource/human_resource.json deleted file mode 100644 index 39ef1cb5033..00000000000 --- a/hrms/hr/insights_workbook/human_resource/human_resource.json +++ /dev/null @@ -1,1565 +0,0 @@ -{ - "charts": { - "human-resource-attrition-rolling-12-months-2": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs prior 12 months", - "measure": { - "aggregation": "max", - "column_name": "attrition_prior", - "data_type": "Decimal", - "format": "percent", - "measure_name": "Prior 12 Months" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 1, - "negative_is_better": true, - "shorten": false - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "attrition", - "data_type": "Decimal", - "format": "percent", - "id": "Attrition, 12 Months", - "measure_name": "Attrition, 12 Months" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "human-resource-attrition-rolling-12-months-2", - "query": "human-resource-attrition-rolling-12-months", - "sort_order": 4, - "title": "Attrition, Rolling 12 Months", - "workbook": "human-resource" - }, - "human-resource-average-tenure-2": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs last year", - "measure": { - "aggregation": "max", - "column_name": "tenure_years_last_year", - "data_type": "Decimal", - "measure_name": "A Year Ago" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 1, - "shorten": false, - "suffix": " yrs" - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "tenure_years", - "data_type": "Decimal", - "id": "Average Tenure", - "measure_name": "Average Tenure" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "human-resource-average-tenure-2", - "query": "human-resource-average-tenure", - "sort_order": 5, - "title": "Average Tenure", - "workbook": "human-resource" - }, - "human-resource-exits-12-months": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs prior 12 months", - "measure": { - "aggregation": "max", - "column_name": "exits_prior", - "data_type": "Integer", - "measure_name": "Exits, Prior 12 Months" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 0, - "negative_is_better": true, - "shorten": false - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "exits", - "data_type": "Integer", - "id": "Exits, 12 Months", - "measure_name": "Exits, 12 Months" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "human-resource-exits-12-months", - "query": "human-resource-joins-exits-12-months", - "sort_order": 3, - "title": "Exits, 12 Months", - "workbook": "human-resource" - }, - "human-resource-exits-by-department-12-months": { - "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": "People", - "reference_lines": [ - { - "aggregate": "average", - "axis": "y", - "dashed": true, - "id": "7ae633cf", - "label": "Company average", - "measure_name": "Exits" - } - ], - "series": [ - { - "measure": { - "aggregation": "sum", - "column_name": "exits", - "data_type": "Integer", - "measure_name": "Exits" - }, - "type": "bar" - } - ], - "show_axis_label": true - } - }, - "folder": null, - "name": "human-resource-exits-by-department-12-months", - "query": "human-resource-workforce-by-month", - "sort_order": 9, - "title": "Exits by Department, 12 Months", - "workbook": "human-resource" - }, - "human-resource-headcount-2": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs last year", - "measure": { - "aggregation": "max", - "column_name": "headcount_last_year", - "data_type": "Integer", - "measure_name": "A Year Ago" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 0, - "shorten": false - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "headcount", - "data_type": "Integer", - "id": "Headcount", - "measure_name": "Headcount" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "human-resource-headcount-2", - "query": "human-resource-headcount", - "sort_order": 1, - "title": "Headcount", - "workbook": "human-resource" - }, - "human-resource-headcount-joins-exits-12-months": { - "chart_type": "Bar", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "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": "People joined and left", - "series": [ - { - "measure": { - "data_type": "Integer", - "expression": { - "expression": "sum(joins)", - "type": "expression" - }, - "measure_name": "Joins" - }, - "type": "bar" - }, - { - "measure": { - "data_type": "Integer", - "expression": { - "expression": "0 - sum(exits)", - "type": "expression" - }, - "measure_name": "Exits" - }, - "type": "bar" - }, - { - "align": "Right", - "measure": { - "data_type": "Integer", - "expression": { - "expression": "sum(headcount)", - "type": "expression" - }, - "measure_name": "Headcount" - }, - "show_data_points": true, - "smooth": true, - "type": "line" - } - ], - "show_axis_label": true - } - }, - "folder": null, - "name": "human-resource-headcount-joins-exits-12-months", - "query": "human-resource-workforce-by-month", - "sort_order": 6, - "title": "Headcount, Joins & Exits, 12 Months", - "workbook": "human-resource" - }, - "human-resource-joiners-leavers-12-months-2": { - "chart_type": "Table", - "config": { - "columns": [], - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 12, - "number_formats": { - "Tenure": { - "decimals": 1, - "shorten": false, - "suffix": " yrs" - } - }, - "order_by": [ - { - "column": { - "column_name": "Moved On", - "type": "column" - }, - "direction": "desc" - } - ], - "rows": [ - { - "column_name": "employee_name", - "data_type": "String", - "dimension_name": "Employee" - }, - { - "column_name": "department_name", - "data_type": "String", - "dimension_name": "Department" - }, - { - "column_name": "movement", - "data_type": "String", - "dimension_name": "Movement" - } - ], - "values": [ - { - "aggregation": "max", - "column_name": "moved_on", - "data_type": "Date", - "measure_name": "Moved On" - }, - { - "aggregation": "max", - "column_name": "tenure_years", - "data_type": "Decimal", - "measure_name": "Tenure" - } - ] - }, - "folder": null, - "name": "human-resource-joiners-leavers-12-months-2", - "query": "human-resource-joiners-leavers-12-months", - "sort_order": 10, - "title": "Joiners & Leavers, 12 Months", - "workbook": "human-resource" - }, - "human-resource-joins-12-months": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs prior 12 months", - "measure": { - "aggregation": "max", - "column_name": "joins_prior", - "data_type": "Integer", - "measure_name": "Prior 12 Months" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 0, - "shorten": false - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "joins", - "data_type": "Integer", - "id": "Joins, 12 Months", - "measure_name": "Joins, 12 Months" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "human-resource-joins-12-months", - "query": "human-resource-joins-exits-12-months", - "sort_order": 2, - "title": "Joins, 12 Months", - "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": "People" - } - }, - "folder": null, - "name": "human-resource-workforce-by-department", - "query": "human-resource-active-roster", - "sort_order": 7, - "title": "Workforce 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": "People", - "type": "column" - }, - "direction": "desc" - } - ], - "x_axis": { - "dimension": { - "column_name": "designation", - "data_type": "String", - "dimension_name": "Designation" - } - }, - "y_axis": { - "axis_label": "People", - "series": [ - { - "measure": { - "aggregation": "count", - "column_name": "name", - "data_type": "Integer", - "measure_name": "People" - }, - "type": "bar" - } - ], - "show_axis_label": true - } - }, - "folder": null, - "name": "human-resource-workforce-by-designation", - "query": "human-resource-active-roster", - "sort_order": 8, - "title": "Workforce by Designation", - "workbook": "human-resource" - } - }, - "creation": "2026-09-19 18:36:43.462880", - "dashboards": { - "human-resource": { - "items": [ - { - "filter_name": "Company", - "filter_type": "String", - "layout": { - "h": 2, - "i": "filter-company", - "w": 4, - "x": 0, - "y": 0 - }, - "layouts": { - "sm": { - "h": 2, - "w": 10, - "x": 0, - "y": 0 - } - }, - "links": { - "human-resource-attrition-rolling-12-months-2": "`human-resource-employee-roster`.`company`", - "human-resource-average-tenure-2": "`human-resource-employee-roster`.`company`", - "human-resource-exits-12-months": "`human-resource-employee-roster`.`company`", - "human-resource-exits-by-department-12-months": "`human-resource-workforce-by-month`.`company`", - "human-resource-headcount-2": "`human-resource-employee-roster`.`company`", - "human-resource-headcount-joins-exits-12-months": "`human-resource-workforce-by-month`.`company`", - "human-resource-joiners-leavers-12-months-2": "`human-resource-joiners-leavers-12-months`.`company`", - "human-resource-joins-12-months": "`human-resource-employee-roster`.`company`", - "human-resource-workforce-by-department": "`human-resource-active-roster`.`company`", - "human-resource-workforce-by-designation": "`human-resource-active-roster`.`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": 10, - "y": 0 - } - }, - "links": { - "human-resource-attrition-rolling-12-months-2": "`human-resource-employee-roster`.`department_name`", - "human-resource-average-tenure-2": "`human-resource-employee-roster`.`department_name`", - "human-resource-exits-12-months": "`human-resource-employee-roster`.`department_name`", - "human-resource-exits-by-department-12-months": "`human-resource-workforce-by-month`.`department_name`", - "human-resource-headcount-2": "`human-resource-employee-roster`.`department_name`", - "human-resource-headcount-joins-exits-12-months": "`human-resource-workforce-by-month`.`department_name`", - "human-resource-joiners-leavers-12-months-2": "`human-resource-joiners-leavers-12-months`.`department_name`", - "human-resource-joins-12-months": "`human-resource-employee-roster`.`department_name`", - "human-resource-workforce-by-department": "`human-resource-active-roster`.`department_name`", - "human-resource-workforce-by-designation": "`human-resource-active-roster`.`department_name`" - }, - "type": "filter" - }, - { - "filter_name": "Designation", - "filter_type": "String", - "layout": { - "h": 2, - "i": "filter-designation", - "w": 4, - "x": 8, - "y": 0 - }, - "layouts": { - "sm": { - "h": 2, - "w": 10, - "x": 0, - "y": 3 - } - }, - "links": { - "human-resource-attrition-rolling-12-months-2": "`human-resource-employee-roster`.`designation`", - "human-resource-average-tenure-2": "`human-resource-employee-roster`.`designation`", - "human-resource-exits-12-months": "`human-resource-employee-roster`.`designation`", - "human-resource-exits-by-department-12-months": "`human-resource-workforce-by-month`.`designation`", - "human-resource-headcount-2": "`human-resource-employee-roster`.`designation`", - "human-resource-headcount-joins-exits-12-months": "`human-resource-workforce-by-month`.`designation`", - "human-resource-joiners-leavers-12-months-2": "`human-resource-joiners-leavers-12-months`.`designation`", - "human-resource-joins-12-months": "`human-resource-employee-roster`.`designation`", - "human-resource-workforce-by-department": "`human-resource-active-roster`.`designation`", - "human-resource-workforce-by-designation": "`human-resource-active-roster`.`designation`" - }, - "type": "filter" - }, - { - "chart": "human-resource-headcount-2", - "layout": { - "h": 5, - "i": "chart-m72911uk1j", - "w": 4, - "x": 0, - "y": 3 - }, - "layouts": { - "sm": { - "h": 5, - "w": 10, - "x": 10, - "y": 3 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-joins-12-months", - "layout": { - "h": 5, - "i": "chart-m72o4skd9d", - "w": 4, - "x": 4, - "y": 3 - }, - "layouts": { - "sm": { - "h": 5, - "w": 10, - "x": 0, - "y": 8 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-exits-12-months", - "layout": { - "h": 5, - "i": "chart-m722r6hi8r", - "w": 4, - "x": 8, - "y": 3 - }, - "layouts": { - "sm": { - "h": 5, - "w": 10, - "x": 10, - "y": 8 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-attrition-rolling-12-months-2", - "layout": { - "h": 5, - "i": "chart-m72q8cgae4", - "w": 4, - "x": 12, - "y": 3 - }, - "layouts": { - "sm": { - "h": 5, - "w": 10, - "x": 0, - "y": 13 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-average-tenure-2", - "layout": { - "h": 5, - "i": "chart-m72g9v1p53", - "w": 4, - "x": 16, - "y": 3 - }, - "layouts": { - "sm": { - "h": 5, - "w": 20, - "x": 0, - "y": 18 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-headcount-joins-exits-12-months", - "layout": { - "h": 17, - "i": "chart-m7231eb4kd", - "w": 20, - "x": 0, - "y": 8 - }, - "layouts": { - "sm": { - "h": 17, - "w": 20, - "x": 0, - "y": 23 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-workforce-by-department", - "layout": { - "h": 17, - "i": "chart-m721bb1ugf", - "w": 10, - "x": 0, - "y": 25 - }, - "layouts": { - "sm": { - "h": 17, - "w": 20, - "x": 0, - "y": 40 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-workforce-by-designation", - "layout": { - "h": 17, - "i": "chart-m72h2frbuf", - "w": 10, - "x": 10, - "y": 25 - }, - "layouts": { - "sm": { - "h": 19, - "w": 20, - "x": 0, - "y": 57 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-exits-by-department-12-months", - "layout": { - "h": 17, - "i": "chart-m72llhjdda", - "w": 10, - "x": 0, - "y": 42 - }, - "layouts": { - "sm": { - "h": 17, - "w": 20, - "x": 0, - "y": 76 - } - }, - "type": "chart" - }, - { - "chart": "human-resource-joiners-leavers-12-months-2", - "layout": { - "h": 17, - "i": "chart-m72nte58m2", - "w": 10, - "x": 10, - "y": 42 - }, - "layouts": { - "sm": { - "h": 24, - "w": 20, - "x": 0, - "y": 93 - } - }, - "type": "chart" - } - ], - "name": "human-resource", - "title": "Human Resource", - "vertical_compact_layout": 1, - "workbook": "human-resource" - } - }, - "docstatus": 0, - "doctype": "Insights Workbook", - "folders": [], - "idx": 0, - "is_standard": 1, - "modified": "2026-09-19 19:02:19.951485", - "modified_by": "Administrator", - "module": "HR", - "name": "human-resource", - "owner": "Administrator", - "queries": { - "human-resource-active-roster": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "human-resource-active-roster", - "operations": [ - { - "table": { - "query_name": "human-resource-employee-roster", - "type": "query", - "workbook": "human-resource" - }, - "type": "source" - }, - { - "filters": [ - { - "expression": { - "expression": "date_of_joining <= today()", - "type": "expression" - } - }, - { - "expression": { - "expression": "exit_date > today()", - "type": "expression" - } - } - ], - "logical_operator": "And", - "type": "filter_group" - } - ], - "sort_order": 2, - "title": "Active Roster", - "use_live_connection": 1, - "workbook": "human-resource" - }, - "human-resource-attrition-rolling-12-months": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "human-resource-attrition-rolling-12-months", - "operations": [ - { - "table": { - "query_name": "human-resource-employee-roster", - "type": "query", - "workbook": "human-resource" - }, - "type": "source" - }, - { - "dimensions": [], - "measures": [ - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "exits" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 24, 'month'), date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "exits_prior" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(month_start(today()), 12, 'month')) & (exit_date > date_sub(month_start(today()), 12, 'month')), one_person)", - "type": "expression" - }, - "measure_name": "headcount_start" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(month_start(today()), 1, 'day')) & (exit_date > date_sub(month_start(today()), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "headcount_end" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(month_start(today()), 24, 'month')) & (exit_date > date_sub(month_start(today()), 24, 'month')), one_person)", - "type": "expression" - }, - "measure_name": "headcount_start_prior" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')) & (exit_date > date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "headcount_end_prior" - } - ], - "type": "summarize" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "exits / ((headcount_start + headcount_end) / 2)", - "type": "expression" - }, - "new_name": "attrition", - "type": "mutate" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "exits_prior / ((headcount_start_prior + headcount_end_prior) / 2)", - "type": "expression" - }, - "new_name": "attrition_prior", - "type": "mutate" - } - ], - "sort_order": 5, - "title": "Attrition, Rolling 12 Months", - "use_live_connection": 1, - "workbook": "human-resource" - }, - "human-resource-average-tenure": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "human-resource-average-tenure", - "operations": [ - { - "table": { - "query_name": "human-resource-employee-roster", - "type": "query", - "workbook": "human-resource" - }, - "type": "source" - }, - { - "data_type": "Integer", - "expression": { - "expression": "date_diff(today(), date_of_joining, 'day')", - "type": "expression" - }, - "new_name": "tenure_days", - "type": "mutate" - }, - { - "data_type": "Integer", - "expression": { - "expression": "date_diff(date_sub(today(), 1, 'year'), date_of_joining, 'day')", - "type": "expression" - }, - "new_name": "tenure_days_last_year", - "type": "mutate" - }, - { - "dimensions": [], - "measures": [ - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if((date_of_joining <= today()) & (exit_date > today()), tenure_days)", - "type": "expression" - }, - "measure_name": "tenure_days_sum" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= today()) & (exit_date > today()), one_person)", - "type": "expression" - }, - "measure_name": "headcount" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(today(), 1, 'year')) & (exit_date > date_sub(today(), 1, 'year')), tenure_days_last_year)", - "type": "expression" - }, - "measure_name": "tenure_days_sum_last_year" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(today(), 1, 'year')) & (exit_date > date_sub(today(), 1, 'year')), one_person)", - "type": "expression" - }, - "measure_name": "headcount_last_year" - } - ], - "type": "summarize" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "tenure_days_sum / headcount / 365.25", - "type": "expression" - }, - "new_name": "tenure_years", - "type": "mutate" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "tenure_days_sum_last_year / headcount_last_year / 365.25", - "type": "expression" - }, - "new_name": "tenure_years_last_year", - "type": "mutate" - } - ], - "sort_order": 6, - "title": "Average Tenure", - "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": "Date", - "expression": { - "expression": "if_null(relieving_date, date_add(today(), 100, 'year'))", - "type": "expression" - }, - "new_name": "exit_date", - "type": "mutate" - }, - { - "data_type": "Date", - "expression": { - "expression": "month_start(date_of_joining)", - "type": "expression" - }, - "new_name": "join_period", - "type": "mutate" - }, - { - "data_type": "Date", - "expression": { - "expression": "month_start(exit_date)", - "type": "expression" - }, - "new_name": "exit_period", - "type": "mutate" - }, - { - "data_type": "Integer", - "expression": { - "expression": "ibis.literal(1)", - "type": "expression" - }, - "new_name": "one_person", - "type": "mutate" - }, - { - "column_names": [ - "name", - "employee_name", - "company", - "department_name", - "designation", - "status", - "date_of_joining", - "relieving_date", - "exit_date", - "join_period", - "exit_period", - "one_person" - ], - "type": "select" - } - ], - "sort_order": 1, - "title": "Employee Roster", - "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" - }, - { - "dimensions": [], - "measures": [ - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= today()) & (exit_date > today()), one_person)", - "type": "expression" - }, - "measure_name": "headcount" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((date_of_joining <= date_sub(today(), 1, 'year')) & (exit_date > date_sub(today(), 1, 'year')), one_person)", - "type": "expression" - }, - "measure_name": "headcount_last_year" - } - ], - "type": "summarize" - } - ], - "sort_order": 3, - "title": "Headcount", - "use_live_connection": 1, - "workbook": "human-resource" - }, - "human-resource-joiners-leavers-12-months": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "human-resource-joiners-leavers-12-months", - "operations": [ - { - "table": { - "query_name": "human-resource-employee-roster", - "type": "query", - "workbook": "human-resource" - }, - "type": "source" - }, - { - "filters": [ - { - "expression": { - "expression": "date_of_joining.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')) | relieving_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", - "type": "expression" - } - } - ], - "logical_operator": "And", - "type": "filter_group" - }, - { - "data_type": "Date", - "expression": { - "expression": "if_null(relieving_date, date_of_joining)", - "type": "expression" - }, - "new_name": "moved_on", - "type": "mutate" - }, - { - "data_type": "String", - "expression": { - "expression": "if_else(is_set(relieving_date), 'Left', 'Joined')", - "type": "expression" - }, - "new_name": "movement", - "type": "mutate" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "date_diff(if_null(relieving_date, today()), date_of_joining, 'day') / 365.25", - "type": "expression" - }, - "new_name": "tenure_years", - "type": "mutate" - }, - { - "column": { - "column_name": "moved_on", - "type": "column" - }, - "direction": "desc", - "type": "order_by" - } - ], - "sort_order": 9, - "title": "Joiners & Leavers, 12 Months", - "use_live_connection": 1, - "workbook": "human-resource" - }, - "human-resource-joins-exits-12-months": { - "folder": null, - "is_builder_query": 1, - "is_native_query": 0, - "is_script_query": 0, - "name": "human-resource-joins-exits-12-months", - "operations": [ - { - "table": { - "query_name": "human-resource-employee-roster", - "type": "query", - "workbook": "human-resource" - }, - "type": "source" - }, - { - "dimensions": [], - "measures": [ - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(date_of_joining.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "joins" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(date_of_joining.between(date_sub(month_start(today()), 24, 'month'), date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "joins_prior" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "exits" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(relieving_date.between(date_sub(month_start(today()), 24, 'month'), date_sub(date_sub(month_start(today()), 12, 'month'), 1, 'day')), one_person)", - "type": "expression" - }, - "measure_name": "exits_prior" - } - ], - "type": "summarize" - } - ], - "sort_order": 4, - "title": "Joins & Exits, 12 Months", - "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": 7, - "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": "company", - "type": "column" - }, - { - "column_name": "department_name", - "type": "column" - }, - { - "column_name": "designation", - "type": "column" - }, - { - "column_name": "join_period", - "type": "column" - }, - { - "column_name": "exit_period", - "type": "column" - } - ], - "table": { - "query_name": "human-resource-employee-roster", - "type": "query", - "workbook": "human-resource" - }, - "type": "join" - }, - { - "dimensions": [ - { - "column_name": "period", - "data_type": "Date", - "dimension_name": "period", - "granularity": "month" - }, - { - "column_name": "company", - "data_type": "String", - "dimension_name": "company" - }, - { - "column_name": "department_name", - "data_type": "String", - "dimension_name": "department_name" - }, - { - "column_name": "designation", - "data_type": "String", - "dimension_name": "designation" - } - ], - "measures": [ - { - "data_type": "Integer", - "expression": { - "expression": "sum_if((join_period <= period) & (exit_period > period), one_person)", - "type": "expression" - }, - "measure_name": "headcount_raw" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(join_period == period, one_person)", - "type": "expression" - }, - "measure_name": "joins_raw" - }, - { - "data_type": "Integer", - "expression": { - "expression": "sum_if(exit_period == period, one_person)", - "type": "expression" - }, - "measure_name": "exits_raw" - } - ], - "type": "summarize" - }, - { - "data_type": "Integer", - "expression": { - "expression": "if_null(headcount_raw, 0)", - "type": "expression" - }, - "new_name": "headcount", - "type": "mutate" - }, - { - "data_type": "Integer", - "expression": { - "expression": "if_null(joins_raw, 0)", - "type": "expression" - }, - "new_name": "joins", - "type": "mutate" - }, - { - "data_type": "Integer", - "expression": { - "expression": "if_null(exits_raw, 0)", - "type": "expression" - }, - "new_name": "exits", - "type": "mutate" - }, - { - "column_names": [ - "period", - "company", - "department_name", - "designation", - "headcount", - "joins", - "exits" - ], - "type": "select" - }, - { - "column": { - "column_name": "period", - "type": "column" - }, - "direction": "asc", - "type": "order_by" - } - ], - "sort_order": 8, - "title": "Workforce by Month", - "use_live_connection": 1, - "workbook": "human-resource" - } - }, - "title": "Human Resource" -} 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 index 4afe4a76322..d7147139a13 100644 --- a/hrms/payroll/insights_workbook/payroll/payroll.json +++ b/hrms/payroll/insights_workbook/payroll/payroll.json @@ -1,6 +1,6 @@ { "charts": { - "payroll-cost-per-employee": { + "payroll-average-monthly-gross-per-employee": { "chart_type": "Number", "config": { "filters": { @@ -11,13 +11,15 @@ "number_column_options": [ { "comparison": { - "label": "vs last year", + "label": "vs last FY", "measure": { - "aggregation": "max", - "column_name": "cost_per_employee_last_year", "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 Month Last Year" + "measure_name": "Same Months Last Year" }, "show": "change", "source": "measure" @@ -28,26 +30,28 @@ ], "number_columns": [ { - "aggregation": "max", - "column_name": "cost_per_employee", "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": "Cost per Employee", - "measure_name": "Cost per Employee" + "id": "Average Monthly Gross per Employee", + "measure_name": "Average Gross Pay (This FY)" } ], "order_by": [], "sparkline": false }, "folder": null, - "name": "payroll-cost-per-employee", - "query": "payroll-cost-per-employee-last-month", - "sort_order": 3, - "title": "Cost per Employee", + "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-cost-per-employee-by-month": { - "chart_type": "Line", + "payroll-deductions-by-component": { + "chart_type": "Bar", "config": { "filters": { "filters": [], @@ -67,6 +71,14 @@ "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", @@ -80,75 +92,26 @@ "series": [ { "measure": { + "aggregation": "sum", + "column_name": "base_amount", "data_type": "Decimal", - "expression": { - "expression": "sum(gross_pay) / count(name)", - "type": "expression" - }, "format": "currency", - "measure_name": "Cost per Employee" + "measure_name": "Deductions" }, - "show_data_points": true, - "smooth": true, - "type": "line" + "type": "bar" } - ] + ], + "stack": true } }, "folder": null, - "name": "payroll-cost-per-employee-by-month", - "query": "payroll-payroll-12-months", - "sort_order": 6, - "title": "Cost per Employee by Month", - "workbook": "payroll" - }, - "payroll-deductions-share": { - "chart_type": "Number", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "limit": 100, - "number_column_options": [ - { - "comparison": { - "label": "vs last year", - "measure": { - "aggregation": "max", - "column_name": "deductions_share_last_year", - "data_type": "Decimal", - "format": "percent", - "measure_name": "Same Month Last Year" - }, - "show": "delta", - "source": "measure" - }, - "decimals": 1, - "shorten": false - } - ], - "number_columns": [ - { - "aggregation": "max", - "column_name": "deductions_share", - "data_type": "Decimal", - "format": "percent", - "id": "Deductions Share", - "measure_name": "Deductions Share" - } - ], - "order_by": [], - "sparkline": false - }, - "folder": null, - "name": "payroll-deductions-share", - "query": "payroll-deductions-share-last-month", - "sort_order": 4, - "title": "Deductions Share", + "name": "payroll-deductions-by-component", + "query": "payroll-deductions-by-component-12-months", + "sort_order": 9, + "title": "Deductions by Component", "workbook": "payroll" }, - "payroll-earnings-mix-by-month": { + "payroll-earnings-by-component": { "chart_type": "Bar", "config": { "filters": { @@ -175,7 +138,7 @@ "data_type": "String", "dimension_name": "Component" }, - "max_split_values": 3 + "max_split_values": 5 }, "x_axis": { "dimension": { @@ -191,7 +154,7 @@ { "measure": { "aggregation": "sum", - "column_name": "amount", + "column_name": "base_amount", "data_type": "Decimal", "format": "currency", "measure_name": "Earnings" @@ -203,10 +166,10 @@ } }, "folder": null, - "name": "payroll-earnings-mix-by-month", + "name": "payroll-earnings-by-component", "query": "payroll-earnings-by-component-12-months", - "sort_order": 7, - "title": "Earnings Mix by Month", + "sort_order": 8, + "title": "Earnings by Component", "workbook": "payroll" }, "payroll-employees-paid": { @@ -222,9 +185,11 @@ "comparison": { "label": "vs last year", "measure": { - "aggregation": "max", - "column_name": "employees_paid_last_year", "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", @@ -236,11 +201,13 @@ ], "number_columns": [ { - "aggregation": "max", - "column_name": "employees_paid", "data_type": "Integer", - "id": "Employees Paid", - "measure_name": "Employees Paid" + "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": [], @@ -249,155 +216,70 @@ "folder": null, "name": "payroll-employees-paid", "query": "payroll-employees-paid-last-month", - "sort_order": 2, + "sort_order": 3, "title": "Employees Paid", "workbook": "payroll" }, - "payroll-pay-change-year-over-year-2": { - "chart_type": "Table", + "payroll-employees-paid-by-month": { + "chart_type": "Line", "config": { - "columns": [], - "conditional_formatting": { - "columns": [], - "formats": [ - { - "color": "amber", - "column": { - "column_name": "Change", - "type": "column" - }, - "mode": "rank_rules", - "operator": "top_n", - "value": 5 - } - ] - }, "filters": { "filters": [], "logical_operator": "And" }, - "limit": 10, - "number_formats": { - "Change": { - "decimals": 1, - "shorten": false - }, - "Last Month": { - "decimals": 1, - "shorten": true - }, - "Same Month Last Year": { - "decimals": 1, - "shorten": true - } + "limit": 100, + "number_format": { + "decimals": 0, + "shorten": false }, "order_by": [ { "column": { - "column_name": "Change", + "column_name": "Month", "type": "column" }, - "direction": "desc" - } - ], - "rows": [ - { - "column_name": "employee_name", - "data_type": "String", - "dimension_name": "Employee" - }, - { - "column_name": "department", - "data_type": "String", - "dimension_name": "Department" - }, - { - "column_name": "designation", - "data_type": "String", - "dimension_name": "Designation" + "direction": "asc" } ], - "values": [ - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay)", - "type": "expression" - }, - "format": "currency", - "measure_name": "Last Month" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", - "type": "expression" - }, - "format": "currency", - "measure_name": "Same Month Last Year" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "(sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay) - sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)) / sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", - "type": "expression" - }, - "format": "percent", - "measure_name": "Change" + "x_axis": { + "dimension": { + "column_name": "start_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" } - ] - }, - "folder": null, - "name": "payroll-pay-change-year-over-year-2", - "query": "payroll-pay-change-year-over-year", - "sort_order": 10, - "title": "Pay Change, Year over Year", - "workbook": "payroll" - }, - "payroll-payroll-by-department": { - "chart_type": "Donut", - "config": { - "filters": { - "filters": [], - "logical_operator": "And" - }, - "label_column": { - "column_name": "department", - "data_type": "String", - "dimension_name": "Department" - }, - "legend_position": "right", - "limit": 100, - "max_slices": 6, - "number_format": { - "decimals": 1, - "shorten": true }, - "order_by": [], - "show_inline_labels": true, - "value_column": { - "aggregation": "sum", - "column_name": "gross_pay", - "data_type": "Decimal", - "format": "currency", - "measure_name": "Payroll Cost" + "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-payroll-by-department", - "query": "payroll-payroll-last-month", - "sort_order": 8, - "title": "Payroll by Department", + "name": "payroll-employees-paid-by-month", + "query": "payroll-employees-paid-12-months", + "sort_order": 6, + "title": "Employees Paid by Month", "workbook": "payroll" }, - "payroll-payroll-by-designation": { - "chart_type": "Row", + "payroll-gross-and-net-pay-by-month": { + "chart_type": "Bar", "config": { "filters": { "filters": [], "logical_operator": "And" }, - "limit": 10, + "limit": 100, "number_format": { "decimals": 1, "shorten": true @@ -405,42 +287,55 @@ "order_by": [ { "column": { - "column_name": "Payroll Cost", + "column_name": "Month", "type": "column" }, - "direction": "desc" + "direction": "asc" } ], "x_axis": { "dimension": { - "column_name": "designation", - "data_type": "String", - "dimension_name": "Designation" + "column_name": "start_date", + "data_type": "Date", + "dimension_name": "Month", + "granularity": "month" } }, "y_axis": { + "min": 0, "series": [ { "measure": { "aggregation": "sum", - "column_name": "gross_pay", + "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": "Payroll Cost" + "measure_name": "Total Deduction" }, "type": "bar" } - ] + ], + "stack": true } }, "folder": null, - "name": "payroll-payroll-by-designation", - "query": "payroll-payroll-last-month", - "sort_order": 9, - "title": "Payroll by Designation", + "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-payroll-cost": { + "payroll-gross-pay": { "chart_type": "Number", "config": { "filters": { @@ -451,13 +346,15 @@ "number_column_options": [ { "comparison": { - "label": "vs last year", + "label": "vs last FY", "measure": { - "aggregation": "max", - "column_name": "payroll_cost_last_year", "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 Month Last Year" + "measure_name": "Same Months Last Year" }, "show": "change", "source": "measure" @@ -468,32 +365,34 @@ ], "number_columns": [ { - "aggregation": "max", - "column_name": "payroll_cost", "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": "Payroll Cost, Last Month", - "measure_name": "Payroll Cost, Last Month" + "id": "Gross Pay", + "measure_name": "Gross Pay (This FY)" } ], "order_by": [], "sparkline": false }, "folder": null, - "name": "payroll-payroll-cost", - "query": "payroll-payroll-cost-last-month", + "name": "payroll-gross-pay", + "query": "payroll-gross-pay-fiscal-year-to-date", "sort_order": 1, - "title": "Payroll Cost", + "title": "Gross Pay", "workbook": "payroll" }, - "payroll-payroll-cost-by-month": { - "chart_type": "Bar", + "payroll-gross-pay-by-department": { + "chart_type": "Row", "config": { "filters": { "filters": [], "logical_operator": "And" }, - "limit": 100, + "limit": 10, "number_format": { "decimals": 1, "shorten": true @@ -501,40 +400,28 @@ "order_by": [ { "column": { - "column_name": "Month", + "column_name": "Gross Pay", "type": "column" }, - "direction": "asc" + "direction": "desc" } ], "x_axis": { "dimension": { - "column_name": "start_date", - "data_type": "Date", - "dimension_name": "Month", - "granularity": "month" + "column_name": "department", + "data_type": "String", + "dimension_name": "Department" } }, "y_axis": { - "min": 0, - "reference_lines": [ - { - "aggregate": "average", - "axis": "y", - "dashed": true, - "id": "3206ab6e", - "label": "12-month average", - "measure_name": "Payroll Cost" - } - ], "series": [ { "measure": { "aggregation": "sum", - "column_name": "gross_pay", + "column_name": "base_gross_pay", "data_type": "Decimal", "format": "currency", - "measure_name": "Payroll Cost" + "measure_name": "Gross Pay" }, "type": "bar" } @@ -542,118 +429,105 @@ } }, "folder": null, - "name": "payroll-payroll-cost-by-month", - "query": "payroll-payroll-12-months", - "sort_order": 5, - "title": "Payroll Cost by Month", + "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" - } - }, - "creation": "2026-09-19 18:37:24.379823", - "dashboards": { - "payroll": { - "items": [ - { - "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-cost-per-employee": "`payroll-salary-slips`.`company`", - "payroll-cost-per-employee-by-month": "`payroll-payroll-12-months`.`company`", - "payroll-deductions-share": "`payroll-salary-slips`.`company`", - "payroll-earnings-mix-by-month": "`payroll-earnings-by-component-12-months`.`company`", - "payroll-employees-paid": "`payroll-salary-slips`.`company`", - "payroll-pay-change-year-over-year-2": "`payroll-pay-change-year-over-year`.`company`", - "payroll-payroll-by-department": "`payroll-payroll-last-month`.`company`", - "payroll-payroll-by-designation": "`payroll-payroll-last-month`.`company`", - "payroll-payroll-cost": "`payroll-salary-slips`.`company`", - "payroll-payroll-cost-by-month": "`payroll-payroll-12-months`.`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": { - "payroll-cost-per-employee": "`payroll-salary-slips`.`department`", - "payroll-cost-per-employee-by-month": "`payroll-payroll-12-months`.`department`", - "payroll-deductions-share": "`payroll-salary-slips`.`department`", - "payroll-earnings-mix-by-month": "`payroll-earnings-by-component-12-months`.`department`", - "payroll-employees-paid": "`payroll-salary-slips`.`department`", - "payroll-pay-change-year-over-year-2": "`payroll-pay-change-year-over-year`.`department`", - "payroll-payroll-by-department": "`payroll-payroll-last-month`.`department`", - "payroll-payroll-by-designation": "`payroll-payroll-last-month`.`department`", - "payroll-payroll-cost": "`payroll-salary-slips`.`department`", - "payroll-payroll-cost-by-month": "`payroll-payroll-12-months`.`department`" - }, - "type": "filter" + }, + "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": [ { - "filter_name": "Designation", + "default_operator": "=", + "default_user_key": "Company", + "filter_name": "Company", "filter_type": "String", "layout": { "h": 2, - "i": "filter-designation", + "i": "filter-company", "w": 4, - "x": 8, + "x": 0, "y": 0 }, "layouts": { "sm": { "h": 2, - "w": 10, - "x": 10, - "y": 3 + "w": 20, + "x": 0, + "y": 0 } }, "links": { - "payroll-cost-per-employee": "`payroll-salary-slips`.`designation`", - "payroll-cost-per-employee-by-month": "`payroll-payroll-12-months`.`designation`", - "payroll-deductions-share": "`payroll-salary-slips`.`designation`", - "payroll-earnings-mix-by-month": "`payroll-earnings-by-component-12-months`.`designation`", - "payroll-employees-paid": "`payroll-salary-slips`.`designation`", - "payroll-pay-change-year-over-year-2": "`payroll-pay-change-year-over-year`.`designation`", - "payroll-payroll-by-department": "`payroll-payroll-last-month`.`designation`", - "payroll-payroll-by-designation": "`payroll-payroll-last-month`.`designation`", - "payroll-payroll-cost": "`payroll-salary-slips`.`designation`", - "payroll-payroll-cost-by-month": "`payroll-payroll-12-months`.`designation`" + "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-payroll-cost", + "chart": "payroll-gross-pay", "layout": { "h": 5, - "i": "chart-mjrheoe8kl", + "i": "chart-3n5kun9ms9", "w": 5, "x": 0, "y": 3 @@ -663,16 +537,16 @@ "h": 5, "w": 10, "x": 0, - "y": 5 + "y": 3 } }, "type": "chart" }, { - "chart": "payroll-employees-paid", + "chart": "payroll-net-pay", "layout": { "h": 5, - "i": "chart-mjr44ujku7", + "i": "chart-3n5ph4hs93", "w": 5, "x": 5, "y": 3 @@ -682,16 +556,16 @@ "h": 5, "w": 10, "x": 10, - "y": 5 + "y": 3 } }, "type": "chart" }, { - "chart": "payroll-cost-per-employee", + "chart": "payroll-employees-paid", "layout": { "h": 5, - "i": "chart-mjr8t2sg47", + "i": "chart-3n5550iea7", "w": 5, "x": 10, "y": 3 @@ -701,16 +575,16 @@ "h": 5, "w": 10, "x": 0, - "y": 10 + "y": 8 } }, "type": "chart" }, { - "chart": "payroll-deductions-share", + "chart": "payroll-average-monthly-gross-per-employee", "layout": { "h": 5, - "i": "chart-mjr3j0qc6v", + "i": "chart-3n5ce1r8ka", "w": 5, "x": 15, "y": 3 @@ -720,16 +594,16 @@ "h": 5, "w": 10, "x": 10, - "y": 10 + "y": 8 } }, "type": "chart" }, { - "chart": "payroll-payroll-cost-by-month", + "chart": "payroll-gross-and-net-pay-by-month", "layout": { "h": 17, - "i": "chart-mjrl4k08kc", + "i": "chart-3n5gdgk0b3", "w": 10, "x": 0, "y": 8 @@ -739,16 +613,16 @@ "h": 17, "w": 20, "x": 0, - "y": 15 + "y": 13 } }, "type": "chart" }, { - "chart": "payroll-cost-per-employee-by-month", + "chart": "payroll-employees-paid-by-month", "layout": { "h": 17, - "i": "chart-mjra2ubkn4", + "i": "chart-3n5fcmrtb9", "w": 10, "x": 10, "y": 8 @@ -758,17 +632,17 @@ "h": 17, "w": 20, "x": 0, - "y": 32 + "y": 30 } }, "type": "chart" }, { - "chart": "payroll-earnings-mix-by-month", + "chart": "payroll-gross-pay-by-department", "layout": { "h": 19, - "i": "chart-mjrup84m15", - "w": 20, + "i": "chart-3n5fqiqgb3", + "w": 10, "x": 0, "y": 25 }, @@ -777,64 +651,45 @@ "h": 19, "w": 20, "x": 0, - "y": 49 - } - }, - "type": "chart" - }, - { - "chart": "payroll-payroll-by-department", - "layout": { - "h": 17, - "i": "chart-mjr3mlq2nv", - "w": 10, - "x": 0, - "y": 44 - }, - "layouts": { - "sm": { - "h": 17, - "w": 20, - "x": 0, - "y": 68 + "y": 47 } }, "type": "chart" }, { - "chart": "payroll-payroll-by-designation", + "chart": "payroll-earnings-by-component", "layout": { - "h": 17, - "i": "chart-mjsiuq62t2", + "h": 19, + "i": "chart-3n506a8pbu", "w": 10, "x": 10, - "y": 44 + "y": 25 }, "layouts": { "sm": { "h": 19, "w": 20, "x": 0, - "y": 85 + "y": 66 } }, "type": "chart" }, { - "chart": "payroll-pay-change-year-over-year-2", + "chart": "payroll-deductions-by-component", "layout": { - "h": 22, - "i": "chart-mjsm668bok", + "h": 19, + "i": "chart-3n5cq3gl4n", "w": 20, "x": 0, - "y": 61 + "y": 44 }, "layouts": { "sm": { - "h": 24, + "h": 19, "w": 20, "x": 0, - "y": 104 + "y": 85 } }, "type": "chart" @@ -843,6 +698,14 @@ "name": "payroll", "title": "Payroll", "vertical_compact_layout": 1, + "visible_to_roles": [ + { + "role": "HR User" + }, + { + "role": "HR Manager" + } + ], "workbook": "payroll" } }, @@ -851,18 +714,18 @@ "folders": [], "idx": 0, "is_standard": 1, - "modified": "2026-09-19 19:02:28.617322", + "modified": "2026-09-28 12:09:41.911184", "modified_by": "Administrator", "module": "Payroll", "name": "payroll", "owner": "Administrator", "queries": { - "payroll-cost-per-employee-last-month": { + "payroll-average-monthly-gross-fiscal-year-to-date": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "payroll-cost-per-employee-last-month", + "name": "payroll-average-monthly-gross-fiscal-year-to-date", "operations": [ { "table": { @@ -876,7 +739,7 @@ "filters": [ { "expression": { - "expression": "start_date.between(date_sub(date_sub(month_start(today()), 1, 'month'), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "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" } } @@ -885,45 +748,32 @@ "type": "filter_group" }, { - "dimensions": [], - "measures": [ - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay) / count_if(start_date >= date_sub(month_start(today()), 1, 'month'))", - "type": "expression" - }, - "format": "currency", - "measure_name": "cost_per_employee" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay) / count_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'))", - "type": "expression" - }, - "format": "currency", - "measure_name": "cost_per_employee_last_year" - } + "column_names": [ + "salary_slip", + "employee", + "employee_name", + "department", + "start_date", + "base_gross_pay" ], - "type": "summarize" + "type": "select" } ], - "sort_order": 4, - "title": "Cost per Employee, Last Month", + "sort_order": 8, + "title": "Average Monthly Gross, Fiscal Year to Date", "use_live_connection": 1, "workbook": "payroll" }, - "payroll-deductions-share-last-month": { + "payroll-deductions-by-component-12-months": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "payroll-deductions-share-last-month", + "name": "payroll-deductions-by-component-12-months", "operations": [ { "table": { - "query_name": "payroll-salary-slips", + "query_name": "payroll-salary-slip-deductions", "type": "query", "workbook": "payroll" }, @@ -933,7 +783,7 @@ "filters": [ { "expression": { - "expression": "start_date.between(date_sub(date_sub(month_start(today()), 1, 'month'), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "expression": "start_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", "type": "expression" } } @@ -942,32 +792,18 @@ "type": "filter_group" }, { - "dimensions": [], - "measures": [ - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), total_deduction) / sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay)", - "type": "expression" - }, - "format": "percent", - "measure_name": "deductions_share" - }, - { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), total_deduction) / sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", - "type": "expression" - }, - "format": "percent", - "measure_name": "deductions_share_last_year" - } + "column_names": [ + "salary_slip", + "employee_name", + "start_date", + "salary_component", + "base_amount" ], - "type": "summarize" + "type": "select" } ], - "sort_order": 5, - "title": "Deductions Share, Last Month", + "sort_order": 13, + "title": "Deductions by Component, 12 Months", "use_live_connection": 1, "workbook": "payroll" }, @@ -980,94 +816,54 @@ "operations": [ { "table": { - "data_source": "Site DB", - "table_name": "tabSalary Detail", - "type": "table" + "query_name": "payroll-salary-slip-earnings", + "type": "query", + "workbook": "payroll" }, "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 - }, - { - "column": { - "column_name": "statistical_component", - "type": "column" - }, - "operator": "=", - "value": 0 + "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" }, { - "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": "company", - "type": "column" - }, - { - "column_name": "department", - "type": "column" - }, - { - "column_name": "designation", - "type": "column" - } + "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": { - "data_source": "Site DB", - "table_name": "tabSalary Slip", - "type": "table" + "query_name": "payroll-salary-slips", + "type": "query", + "workbook": "payroll" }, - "type": "join" + "type": "source" }, { "filters": [ @@ -1081,30 +877,19 @@ "logical_operator": "And", "type": "filter_group" }, - { - "data_type": "String", - "expression": { - "expression": "parent", - "type": "expression" - }, - "new_name": "salary_slip", - "type": "mutate" - }, { "column_names": [ - "salary_slip", - "salary_component", - "start_date", - "company", + "employee", + "employee_name", "department", "designation", - "amount" + "start_date" ], "type": "select" } ], - "sort_order": 8, - "title": "Earnings by Component, 12 Months", + "sort_order": 10, + "title": "Employees Paid, 12 Months", "use_live_connection": 1, "workbook": "payroll" }, @@ -1136,39 +921,27 @@ "type": "filter_group" }, { - "dimensions": [], - "measures": [ - { - "data_type": "Integer", - "expression": { - "expression": "count_if(start_date >= date_sub(month_start(today()), 1, 'month'))", - "type": "expression" - }, - "measure_name": "employees_paid" - }, - { - "data_type": "Integer", - "expression": { - "expression": "count_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'))", - "type": "expression" - }, - "measure_name": "employees_paid_last_year" - } + "column_names": [ + "employee", + "employee_name", + "department", + "designation", + "start_date" ], - "type": "summarize" + "type": "select" } ], - "sort_order": 3, + "sort_order": 7, "title": "Employees Paid, Last Month", "use_live_connection": 1, "workbook": "payroll" }, - "payroll-pay-change-year-over-year": { + "payroll-gross-and-net-pay-12-months": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "payroll-pay-change-year-over-year", + "name": "payroll-gross-and-net-pay-12-months", "operations": [ { "table": { @@ -1182,26 +955,38 @@ "filters": [ { "expression": { - "expression": "start_date.between(date_sub(date_sub(month_start(today()), 1, 'month'), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "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": "Pay Change, Year over Year", + "title": "Gross and Net Pay, 12 Months", "use_live_connection": 1, "workbook": "payroll" }, - "payroll-payroll-12-months": { + "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-payroll-12-months", + "name": "payroll-gross-pay-by-department-fiscal-year-to-date", "operations": [ { "table": { @@ -1215,26 +1000,36 @@ "filters": [ { "expression": { - "expression": "start_date.between(date_sub(month_start(today()), 12, 'month'), date_sub(month_start(today()), 1, 'day'))", + "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": 6, - "title": "Payroll, 12 Months", + "sort_order": 11, + "title": "Gross Pay by Department, Fiscal Year to Date", "use_live_connection": 1, "workbook": "payroll" }, - "payroll-payroll-cost-last-month": { + "payroll-gross-pay-fiscal-year-to-date": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "payroll-payroll-cost-last-month", + "name": "payroll-gross-pay-fiscal-year-to-date", "operations": [ { "table": { @@ -1248,7 +1043,7 @@ "filters": [ { "expression": { - "expression": "start_date.between(date_sub(date_sub(month_start(today()), 1, 'month'), 1, 'year'), date_sub(month_start(today()), 1, 'day'))", + "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" } } @@ -1257,41 +1052,114 @@ "type": "filter_group" }, { - "dimensions": [], - "measures": [ + "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": [ { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date >= date_sub(month_start(today()), 1, 'month'), gross_pay)", - "type": "expression" + "column": { + "column_name": "docstatus", + "type": "column" }, - "format": "currency", - "measure_name": "payroll_cost" - }, + "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": "base_gross_pay - base_net_pay - base_total_deduction", + "type": "expression" + }, + "new_name": "base_amount", + "type": "mutate" + }, + { + "filters": [ { - "data_type": "Decimal", - "expression": { - "expression": "sum_if(start_date <= date_sub(date_sub(month_start(today()), 1, 'day'), 1, 'year'), gross_pay)", - "type": "expression" + "column": { + "column_name": "base_amount", + "type": "column" }, - "format": "currency", - "measure_name": "payroll_cost_last_year" + "operator": "!=", + "value": 0 } ], - "type": "summarize" + "logical_operator": "And", + "type": "filter_group" + }, + { + "column_names": [ + "salary_slip", + "employee_name", + "company", + "start_date", + "salary_component", + "base_amount" + ], + "type": "select" } ], - "sort_order": 2, - "title": "Payroll Cost, Last Month", + "sort_order": 3, + "title": "Loan Repayments", "use_live_connection": 1, "workbook": "payroll" }, - "payroll-payroll-last-month": { + "payroll-net-pay-fiscal-year-to-date": { "folder": null, "is_builder_query": 1, "is_native_query": 0, "is_script_query": 0, - "name": "payroll-payroll-last-month", + "name": "payroll-net-pay-fiscal-year-to-date", "operations": [ { "table": { @@ -1305,17 +1173,286 @@ "filters": [ { "expression": { - "expression": "start_date.between(date_sub(month_start(today()), 1, 'month'), date_sub(month_start(today()), 1, 'day'))", + "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": 7, - "title": "Payroll, Last Month", + "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" }, @@ -1348,32 +1485,36 @@ "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": "total_working_days - payment_days", + "expression": "base_gross_pay - base_net_pay", "type": "expression" }, - "new_name": "unpaid_days", + "new_name": "deductions", "type": "mutate" }, { "column_names": [ - "name", + "salary_slip", "employee", "employee_name", - "start_date", - "posting_date", - "company", "department", "designation", - "salary_structure", - "total_working_days", - "payment_days", - "unpaid_days", - "gross_pay", - "total_deduction", - "net_pay" + "company", + "start_date", + "base_gross_pay", + "base_net_pay", + "deductions" ], "type": "select" } From 5469b27b0e6d75753688eb9504ecefc94e23b7f3 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Sep 2026 12:43:34 +0530 Subject: [PATCH 4/8] feat: point the dashboard sidebar items at Insights only where it is installed --- hrms/expenses/sidebar/expenses/expenses.json | 7 +++---- hrms/hooks.py | 2 +- hrms/hr_setup/sidebar/hr_setup/hr_setup.json | 7 +++---- hrms/payroll/sidebar/payroll/payroll.json | 7 +++---- hrms/setup.py | 18 ++++++++++++++++++ 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/hrms/expenses/sidebar/expenses/expenses.json b/hrms/expenses/sidebar/expenses/expenses.json index f09c8dd14df..90ced4ec51b 100644 --- a/hrms/expenses/sidebar/expenses/expenses.json +++ b/hrms/expenses/sidebar/expenses/expenses.json @@ -25,9 +25,8 @@ "indent": 0, "keep_closed": 0, "label": "Dashboard", - "link_to": "insights-dashboard", - "link_type": "Page", - "route": "expense-claims", + "link_to": "Expense Claims", + "link_type": "Dashboard", "show_arrow": 0, "type": "Link" }, @@ -269,7 +268,7 @@ "type": "Link" } ], - "modified": "2026-09-19 21:30:00.000000", + "modified": "2026-08-07 12:00:00.000000", "modified_by": "Administrator", "module": "Expenses", "name": "Expenses", diff --git a/hrms/hooks.py b/hrms/hooks.py index 5855978d39e..65432b543a3 100644 --- a/hrms/hooks.py +++ b/hrms/hooks.py @@ -99,7 +99,7 @@ # before_install = "hrms.install.before_install" after_install = "hrms.install.after_install" -after_migrate = "hrms.setup.update_select_perm_after_install" +after_migrate = ["hrms.setup.update_select_perm_after_install", "hrms.setup.set_dashboard_links"] setup_wizard_requires = "assets/hrms/js/setup_wizard.js" setup_wizard_stages = "hrms.setup_wizard.get_setup_stages" diff --git a/hrms/hr_setup/sidebar/hr_setup/hr_setup.json b/hrms/hr_setup/sidebar/hr_setup/hr_setup.json index a57855f7fcb..cabde9a1f90 100644 --- a/hrms/hr_setup/sidebar/hr_setup/hr_setup.json +++ b/hrms/hr_setup/sidebar/hr_setup/hr_setup.json @@ -25,9 +25,8 @@ "indent": 0, "keep_closed": 0, "label": "Dashboard", - "link_to": "insights-dashboard", - "link_type": "Page", - "route": "human-resource", + "link_to": "Human Resource", + "link_type": "Dashboard", "show_arrow": 0, "type": "Link" }, @@ -149,7 +148,7 @@ "url": "/desk/hr-settings#employee_tab" } ], - "modified": "2026-09-19 21:30:00.000000", + "modified": "2026-08-13 20:00:00.000000", "modified_by": "Administrator", "module": "HR Setup", "name": "HR Setup", diff --git a/hrms/payroll/sidebar/payroll/payroll.json b/hrms/payroll/sidebar/payroll/payroll.json index 98b704a9b3e..42cab32e659 100644 --- a/hrms/payroll/sidebar/payroll/payroll.json +++ b/hrms/payroll/sidebar/payroll/payroll.json @@ -26,10 +26,9 @@ "indent": 0, "keep_closed": 0, "label": "Dashboard", - "link_to": "insights-dashboard", - "link_type": "Page", + "link_to": "Payroll", + "link_type": "Dashboard", "open_in_new_tab": 1, - "route": "payroll", "show_arrow": 0, "type": "Link" }, @@ -239,7 +238,7 @@ "type": "Link" } ], - "modified": "2026-09-19 21:30:00.000000", + "modified": "2026-08-07 12:00:00.000000", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll", diff --git a/hrms/setup.py b/hrms/setup.py index 3140a326074..1334a1bfa4b 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -88,6 +88,9 @@ def get_customizations(): def after_app_install(app_name): """Set up loan integration with payroll""" + if app_name == "insights": + set_dashboard_links() + if app_name != "lending": return @@ -96,6 +99,21 @@ def after_app_install(app_name): add_lending_docperms_to_ess() +# (sidebar, the desk Dashboard its Dashboard item links, the Insights dashboard that replaces it) +DASHBOARD_LINKS = [ + ("HR Setup", "Human Resource", "human-resource"), + ("Expenses", "Expense Claims", "expense-claims"), + ("Payroll", "Payroll", "payroll"), + ("Shift & Attendance", "Attendance", "attendance"), +] + + +def set_dashboard_links(): + from erpnext.setup.insights_dashboards import set_dashboard_links + + set_dashboard_links(DASHBOARD_LINKS) + + def before_app_uninstall(app_name): """Clean up loan integration with payroll""" if app_name != "lending": From 45309e6ae8badcb967045ea0022c9dffe1803a2c Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Sep 2026 12:56:51 +0530 Subject: [PATCH 5/8] fix: restore the desk dashboard links when Insights is uninstalled --- hrms/hooks.py | 2 +- hrms/setup.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hrms/hooks.py b/hrms/hooks.py index 65432b543a3..79a731e8815 100644 --- a/hrms/hooks.py +++ b/hrms/hooks.py @@ -133,7 +133,7 @@ # Name of the app being uninstalled is passed as an argument before_app_uninstall = "hrms.setup.before_app_uninstall" -# after_app_uninstall = "hrms.utils.after_app_uninstall" +after_app_uninstall = "hrms.setup.after_app_uninstall" # Desk Notifications # ------------------ diff --git a/hrms/setup.py b/hrms/setup.py index 1334a1bfa4b..264639e3065 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -114,6 +114,12 @@ def set_dashboard_links(): set_dashboard_links(DASHBOARD_LINKS) +def after_app_uninstall(app_name): + if app_name == "insights": + set_dashboard_links() + frappe.db.commit() # nosemgrep + + def before_app_uninstall(app_name): """Clean up loan integration with payroll""" if app_name != "lending": From e02fff4a821a8683884cc9d391629cf6eda5edf2 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Sep 2026 12:56:51 +0530 Subject: [PATCH 6/8] fix: read loan repayment in the salary slip's currency so rounding does not show as one --- hrms/payroll/insights_workbook/payroll/payroll.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hrms/payroll/insights_workbook/payroll/payroll.json b/hrms/payroll/insights_workbook/payroll/payroll.json index d7147139a13..80a8ca10efc 100644 --- a/hrms/payroll/insights_workbook/payroll/payroll.json +++ b/hrms/payroll/insights_workbook/payroll/payroll.json @@ -714,7 +714,7 @@ "folders": [], "idx": 0, "is_standard": 1, - "modified": "2026-09-28 12:09:41.911184", + "modified": "2026-09-28 12:56:29.244088", "modified_by": "Administrator", "module": "Payroll", "name": "payroll", @@ -1117,7 +1117,7 @@ { "data_type": "Decimal", "expression": { - "expression": "base_gross_pay - base_net_pay - base_total_deduction", + "expression": "(gross_pay - net_pay - total_deduction) * exchange_rate", "type": "expression" }, "new_name": "base_amount", From 19023cd61eeddadacb12b75b641f1af22fe591b3 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Sep 2026 13:07:27 +0530 Subject: [PATCH 7/8] fix: leave the dashboard links alone on an Insights uninstall dry run --- hrms/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hrms/setup.py b/hrms/setup.py index 264639e3065..79884c30493 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -115,7 +115,8 @@ def set_dashboard_links(): def after_app_uninstall(app_name): - if app_name == "insights": + # a dry run calls this hook too, with Insights still installed + if app_name == "insights" and "insights" not in frappe.get_installed_apps(): set_dashboard_links() frappe.db.commit() # nosemgrep From 7201e957b20f1dfeb68af4b9e75e765b474ca5e4 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Sep 2026 13:55:53 +0530 Subject: [PATCH 8/8] feat: open the dashboards in Insights through the Dashboard's insights_dashboard field Replaces the sidebar rewrite. Each Dashboard names its Insights dashboard; without Insights the field does not exist and the desk Dashboard opens. --- hrms/hooks.py | 4 +-- .../hr_dashboard/attendance/attendance.json | 3 ++- .../expense_claims/expense_claims.json | 3 ++- .../human_resource/human_resource.json | 3 ++- .../payroll_dashboard/payroll/payroll.json | 3 ++- hrms/setup.py | 25 ------------------- 6 files changed, 10 insertions(+), 31 deletions(-) diff --git a/hrms/hooks.py b/hrms/hooks.py index 79a731e8815..5855978d39e 100644 --- a/hrms/hooks.py +++ b/hrms/hooks.py @@ -99,7 +99,7 @@ # before_install = "hrms.install.before_install" after_install = "hrms.install.after_install" -after_migrate = ["hrms.setup.update_select_perm_after_install", "hrms.setup.set_dashboard_links"] +after_migrate = "hrms.setup.update_select_perm_after_install" setup_wizard_requires = "assets/hrms/js/setup_wizard.js" setup_wizard_stages = "hrms.setup_wizard.get_setup_stages" @@ -133,7 +133,7 @@ # Name of the app being uninstalled is passed as an argument before_app_uninstall = "hrms.setup.before_app_uninstall" -after_app_uninstall = "hrms.setup.after_app_uninstall" +# after_app_uninstall = "hrms.utils.after_app_uninstall" # Desk Notifications # ------------------ 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/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", diff --git a/hrms/setup.py b/hrms/setup.py index 79884c30493..3140a326074 100644 --- a/hrms/setup.py +++ b/hrms/setup.py @@ -88,9 +88,6 @@ def get_customizations(): def after_app_install(app_name): """Set up loan integration with payroll""" - if app_name == "insights": - set_dashboard_links() - if app_name != "lending": return @@ -99,28 +96,6 @@ def after_app_install(app_name): add_lending_docperms_to_ess() -# (sidebar, the desk Dashboard its Dashboard item links, the Insights dashboard that replaces it) -DASHBOARD_LINKS = [ - ("HR Setup", "Human Resource", "human-resource"), - ("Expenses", "Expense Claims", "expense-claims"), - ("Payroll", "Payroll", "payroll"), - ("Shift & Attendance", "Attendance", "attendance"), -] - - -def set_dashboard_links(): - from erpnext.setup.insights_dashboards import set_dashboard_links - - set_dashboard_links(DASHBOARD_LINKS) - - -def after_app_uninstall(app_name): - # a dry run calls this hook too, with Insights still installed - if app_name == "insights" and "insights" not in frappe.get_installed_apps(): - set_dashboard_links() - frappe.db.commit() # nosemgrep - - def before_app_uninstall(app_name): """Clean up loan integration with payroll""" if app_name != "lending":