You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[QA Retest & Close] Expense - Tax amount is negative when expense amount is not negative when merging expenses #103707
Version Number: 9.5.7-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#102175 Email or phone of affected tester (no customers):jsoidjndoiniodnsjojd@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable Taxes.
Go to staging.new.expensify.com
Go to workspace chat.
Create expense A with negative amount.
Open the report.
Change tax rate to 5% rate.
Create expense B with positive amount and 0% rate.
Open the report.
Bulk select both expenses.
Click More > Merge.
Select expense B amount, 5% rate and any other details.
Click Continue.
Expected Result:
On confirm page, tax amount will not be negative because the expense amount is not negative.
Actual Result:
On confirm page, tax amount is negative when the expense amount is not negative.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Recommendation: Revert. The bug only affects the merge confirmation page. The saved expense is correct, because the merge action never sends taxAmount.
Root cause: The merge flow stores taxAmount with the sign the user sees. The PR now passes that value through getTaxAmount, which flips the sign again for expense reports. A positive tax then shows as negative (MoneyRequestView.tsx:380). Before the PR, the merge flow showed Math.abs(updatedTransaction.taxAmount), so the sign never mattered.
Investigation details
Picking a tax rate during a merge calculates taxAmount from mergeTransaction.amount, which already has the sign the user sees (MergeTransactionUtils.ts:877-884). The amount is only negated when the merge is saved (MergeTransaction.ts:478-480).
MoneyRequestView already special-cases the amount in the merge flow for this reason (MoneyRequestView.tsx:363-364). The PR did not do the same for tax.
Expense A being negative does not matter. Any merge where the tax is recalculated from the selected rate shows a negative tax, including a merge of two positive expenses.
Fixing forward is risky. taxAmount in the merge flow comes from mixed sources: some use the stored sign (L802-804, L862) and one uses the shown sign (L882). The old Math.abs hid this.
If you prefer to fix forward, give the tax the same sign as actualAmount in the merge flow:
Reverting brings back the production behavior, where a refund's tax shows unsigned on the details page. That was the original issue the PR fixed, and it is not a new regression.
changed the title [-]Expense - Tax amount is negative when expense amount is not negative when merging expenses[/-][+][QA Retest & Close] Expense - Tax amount is negative when expense amount is not negative when merging expenses[/+]on Oct 12, 2026
Activity
applause-bot commentedon Oct 12, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/f36d35f0d4fe6360e44c4933d28380e3aaff0d2c24e1e6d3929a0ce0a154de1e
melvin-bot commentedon Oct 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #102175
melvin-bot commentedon Oct 12, 2026
@grgia you have been assigned to this deploy blocker because you reviewed the offending PR: #102175
melvin-bot commentedon Oct 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 12, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Oct 12, 2026
Deploy Blocker Analysis
Causing PR: Show negative tax amount for negative expenses on the expense details page (high confidence). It is on the current staging checklist.
Recommendation: Revert. The bug only affects the merge confirmation page. The saved expense is correct, because the merge action never sends
taxAmount.Root cause: The merge flow stores
taxAmountwith the sign the user sees. The PR now passes that value throughgetTaxAmount, which flips the sign again for expense reports. A positive tax then shows as negative (MoneyRequestView.tsx:380). Before the PR, the merge flow showedMath.abs(updatedTransaction.taxAmount), so the sign never mattered.Investigation details
taxAmountfrommergeTransaction.amount, which already has the sign the user sees (MergeTransactionUtils.ts:877-884). The amount is only negated when the merge is saved (MergeTransaction.ts:478-480).MoneyRequestViewalready special-cases the amount in the merge flow for this reason (MoneyRequestView.tsx:363-364). The PR did not do the same for tax.taxAmountin the merge flow comes from mixed sources: some use the stored sign (L802-804, L862) and one uses the shown sign (L882). The oldMath.abshid this.actualAmountin the merge flow:view run
grgia commentedon Oct 12, 2026
Same cause as #103671, #103677 covers it. Tracking both there, no revert
[-]Expense - Tax amount is negative when expense amount is not negative when merging expenses[/-][+][QA Retest & Close] Expense - Tax amount is negative when expense amount is not negative when merging expenses[/+]kavimuru commentedon Oct 12, 2026
not reproducible
Retest.103707.mp4