diff --git a/core/templates/core/payroll_dashboard.html b/core/templates/core/payroll_dashboard.html index 57c5ec2..666887d 100644 --- a/core/templates/core/payroll_dashboard.html +++ b/core/templates/core/payroll_dashboard.html @@ -1948,6 +1948,41 @@ document.addEventListener('DOMContentLoaded', function() { addAdjPayImmediatelyGroup.style.display = (payNowTypes.indexOf(addAdjType.value) !== -1) ? '' : 'none'; } + // === Salary → managers-only picker scope === + // Salary is a managers-only adjustment (Worker.pay_type='fixed'). + // To make it IMPOSSIBLE to accidentally pay a Salary to a daily + // worker, when the type is Salary we: (1) set the pay-type + // filter to "Managers only", (2) hide every non-manager row, + // and (3) UNTICK any non-manager that was already selected so a + // stray daily-worker tick can't ride along hidden into a bad + // Salary adjustment. For any other type we reset the filter to + // "All" and re-show every row (we do NOT re-tick anything — the + // user re-selects deliberately). Re-grab the filter