diff --git a/core/templates/core/payroll_dashboard.html b/core/templates/core/payroll_dashboard.html index 3e36a0b..99b6aa3 100644 --- a/core/templates/core/payroll_dashboard.html +++ b/core/templates/core/payroll_dashboard.html @@ -814,6 +814,14 @@ document.addEventListener('DOMContentLoaded', function() { callbacks: { label: function(context) { return context.dataset.label + ': ' + fmt(context.parsed.y); + }, + // Show the month total at the bottom of the tooltip + footer: function(tooltipItems) { + var total = 0; + tooltipItems[0].chart.data.datasets.forEach(function(ds) { + total += ds.data[tooltipItems[0].dataIndex] || 0; + }); + return 'Total: ' + fmt(total); } } }