From fa11fb3113dba6de6d31eef6408d284f410b5cd6 Mon Sep 17 00:00:00 2001 From: zachery with an e <45150570+zweatshirt@users.noreply.github.com> Date: Mon, 11 May 2026 15:22:53 -0500 Subject: [PATCH 1/3] Fix calculation of gross monthly pay by removing unnecessary multiplier --- .../HrTools/PdsGoalCalculator/calculations/salaryCalculation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.ts b/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.ts index d47af4622d..9be7972240 100644 --- a/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.ts +++ b/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.ts @@ -31,7 +31,7 @@ export const calculateSalaryTotals = ( calculation.salaryOrHourly === DesignationSupportSalaryType.Salaried; const monthlyBase = isSalaried ? payRate / 12 : (payRate * hours * 52) / 12; - const grossMonthlyPay = monthlyBase * (1 + geographicMultiplier); + const grossMonthlyPay = monthlyBase * geographicMultiplier; const employerFica = grossMonthlyPay * employerFicaRate; const subtotal = grossMonthlyPay + employerFica; From eae6f6fbc3aa899b7bfe5dd38ebb6d0479dcbf0b Mon Sep 17 00:00:00 2001 From: zachery with an e <45150570+zweatshirt@users.noreply.github.com> Date: Mon, 11 May 2026 15:28:21 -0500 Subject: [PATCH 2/3] Add test for full-multiplier-shape geographic multiplier in salary calculation --- .../calculations/salaryCalculation.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts b/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts index c78088deed..b6a771418e 100644 --- a/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts +++ b/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts @@ -48,6 +48,14 @@ describe('calculateSalaryTotals', () => { expect(result.grossMonthlyPay).toBeCloseTo(5300); }); + it('applies a full-multiplier-shape geographic multiplier (e.g., 1.01 = 1% boost)', () => { + const result = calculateSalaryTotals(salaried(), { + geographicMultiplier: 1.01, + employerFicaRate: FICA_RATE, + }); + expect(result.grossMonthlyPay).toBeCloseTo(5050); + }); + it('ignores hoursWorkedPerWeek', () => { const result = calculateSalaryTotals( salaried({ hoursWorkedPerWeek: 40 }), From d5e3a1042aa4d6b5f6e6360f4651f22ff2d6266c Mon Sep 17 00:00:00 2001 From: zachery with an e <45150570+zweatshirt@users.noreply.github.com> Date: Mon, 11 May 2026 15:36:10 -0500 Subject: [PATCH 3/3] Improve test relating to Geographic Multiplier --- .../calculations/salaryCalculation.test.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts b/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts index b6a771418e..99088735ac 100644 --- a/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts +++ b/src/components/HrTools/PdsGoalCalculator/calculations/salaryCalculation.test.ts @@ -48,12 +48,17 @@ describe('calculateSalaryTotals', () => { expect(result.grossMonthlyPay).toBeCloseTo(5300); }); - it('applies a full-multiplier-shape geographic multiplier (e.g., 1.01 = 1% boost)', () => { - const result = calculateSalaryTotals(salaried(), { - geographicMultiplier: 1.01, + it('multiplies monthlyBase by geographicMultiplier to produce grossMonthlyPay', () => { + const payRate = 60000; + const geographicMultiplier = 1.01; + const result = calculateSalaryTotals(salaried({ payRate }), { + geographicMultiplier, employerFicaRate: FICA_RATE, }); - expect(result.grossMonthlyPay).toBeCloseTo(5050); + expect(result.monthlyBase).toBe(payRate / 12); + expect(result.grossMonthlyPay).toBeCloseTo( + (payRate / 12) * geographicMultiplier, + ); }); it('ignores hoursWorkedPerWeek', () => {