diff --git a/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.test.tsx b/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.test.tsx index c12a0a874e..a2656c0d92 100644 --- a/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.test.tsx +++ b/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.test.tsx @@ -99,6 +99,28 @@ describe('buildSalaryBreakdownRows', () => { expect(byId['total']).toBeCloseTo(4680.0, 2); }); + it('shows "Monthly Base" formula when geographic multiplier is 0', () => { + const rows = buildSalaryBreakdownRows( + salariedCalculation, + { ...constants, geographicMultiplier: 0 }, + 'en-US', + i18n.t, + ); + const row = rows.find((r) => r.id === 'gross-monthly-pay'); + expect(row?.formula).toBe('Monthly Base'); + }); + + it('shows "Monthly Base × Geographic Multiplier (rate)" formula when multiplier is non-zero', () => { + const rows = buildSalaryBreakdownRows( + salariedCalculation, + { ...constants, geographicMultiplier: 0.06 }, + 'en-US', + i18n.t, + ); + const row = rows.find((r) => r.id === 'gross-monthly-pay'); + expect(row?.formula).toBe('Monthly Base × Geographic Multiplier (106%)'); + }); + it('inserts hours-per-week and monthly-base rows for hourly', () => { const rows = buildSalaryBreakdownRows( hourlyCalculation, diff --git a/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.tsx b/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.tsx index 84e0253af1..9b5d9b0931 100644 --- a/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.tsx +++ b/src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.tsx @@ -76,9 +76,12 @@ export const buildSalaryBreakdownRows = ( { id: 'gross-monthly-pay', category: t('Gross Monthly Pay'), - formula: t('Monthly Base × Geographic Multiplier ({{rate}})', { - rate: percentageFormat(1 + geographicMultiplier, locale), - }), + formula: + geographicMultiplier === 0 + ? t('Monthly Base') + : t('Monthly Base × Geographic Multiplier ({{rate}})', { + rate: percentageFormat(1 + geographicMultiplier, locale), + }), amount: grossMonthlyPay, format: 'currency', testId: 'gross-monthly-pay',