Skip to content

fix(#2086): correct payroll tax withholding undercalculation on bonuses - #2093

Merged
Dev1822 merged 1 commit into
Dev1822:mainfrom
Vachhani-Tapan:fix/issue-2086-bonus-tax-withholding
Aug 31, 2026
Merged

fix(#2086): correct payroll tax withholding undercalculation on bonuses#2093
Dev1822 merged 1 commit into
Dev1822:mainfrom
Vachhani-Tapan:fix/issue-2086-bonus-tax-withholding

Conversation

@Vachhani-Tapan

Copy link
Copy Markdown

Fix: Payroll Tax Withholding Undercalculation on Bonuses

Resolves#2086

Description

This PR addresses the critical issue where one-time bonus payments were being under-taxed by placing employees in lower marginal tax brackets instead of applying supplemental or annualized tax rates.

Bonus payments are now appropriately evaluated distinctly from regular monthly income, allowing for much more accurate statutory withholding for high-earning individuals.

Code Changes

  • Added taxOnBonus Utility: Implemented a new calculation strategy inside backend/src/utils/taxCalculator.js capable of processing bonus taxation using either a SUPPLEMENTAL flat-rate method (defaulting to 22%) or the AGGREGATE method (which marginalizes the bonus over the annualized base salary).
  • Integrated into TaxService: Updated calculateTax() in backend/src/services/tax.service.js to accept bonusIncome and an optional bonusTaxMethod. The service now securely separates and aggregates base and bonus taxation logic without disrupting old legacy routines.
  • Added Unit Tests: Included comprehensive testing in taxCalculator.test.js to ensure the AGGREGATE marginal difference operates correctly on large bonuses and falls back to flat-rate supplemental rules securely.

Verification

  • Passed all slab and progressive calculation unit tests (node --test).
  • No breaking changes to existing regular payroll configurations or deductions.

@vercel

vercelBot commented Aug 31, 2026

Copy link
Copy Markdown

@Vachhani-Tapan is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Dev1822Dev1822 added enhancement New feature or request ECSoC26 labels Aug 31, 2026
@Dev1822
Dev1822 merged commit 4f6dcb0 into Dev1822:mainAug 31, 2026
5 of 20 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECSoC26-L2ECSoC26enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Payroll Tax Withholding Undercalculation on Bonuses

2 participants

@Vachhani-Tapan@Dev1822