fix(#2086): correct payroll tax withholding undercalculation on bonuses - #2093
Merged
Dev1822 merged 1 commit intoAug 31, 2026
Merged
Conversation
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
taxOnBonusUtility: Implemented a new calculation strategy insidebackend/src/utils/taxCalculator.jscapable of processing bonus taxation using either aSUPPLEMENTALflat-rate method (defaulting to 22%) or theAGGREGATEmethod (which marginalizes the bonus over the annualized base salary).TaxService: UpdatedcalculateTax()inbackend/src/services/tax.service.jsto acceptbonusIncomeand an optionalbonusTaxMethod. The service now securely separates and aggregates base and bonus taxation logic without disrupting old legacy routines.taxCalculator.test.jsto ensure theAGGREGATEmarginal difference operates correctly on large bonuses and falls back to flat-rate supplemental rules securely.Verification
node --test).