Skip to content

[$250] Missing Tax rate section when merging expenses when expenses are created without Tax first #83098

Closed as not planned

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.24-1
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #71244
Email or phone of affected tester (no customers): soidjnsoidjonjonjsojnsdj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a workspace.
  3. Go to workspace chat.
  4. Create two expenses.
  5. Go to workspace settings > More features.
  6. Enable Taxes.
  7. Open one of the expenses from Step 4.
  8. Click Tax and select 5% rate.
  9. Click More > Merge.
  10. Select the other expense from Step 4 > Continue.
    → Tax rate section is missing.
  11. Close the merge flow.
  12. Open the other expense (not the 5% tax rate expense).
  13. Click Tax and select 5% rate.
  14. Click Tax and change back to 0% rate.
  15. Open the 5% tax rate expense.
  16. Click More > Merge.
  17. Select the 0% tax rate expense from Step 4 > Continue.
    → Now Tax rate section is shown.

Expected Result:

In Step 10, Tax rate section should be shown because both expenses have different tax rates.

Actual Result:

In Step 10, Tax rate section is missing when both expenses have different tax rates.
In Step 17, Tax rate section is only shown after changing tax rate and reselecting 0% rate.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @Krishna2323
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022024924926094473545
  • Upwork Job ID: 2024924926094473545
  • Last Price Increase: 2026-02-20

Activity

  1. added
    DeployBlockerCash
    on Feb 20, 2026
  2. added
    Bug
    on Feb 20, 2026
  3. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #71244

  4. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  6. github-actions commented on Feb 20, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. OSBotify commented on Feb 20, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #71244 - "[Merge] Merging tax rates" by @dominictb (High confidence)
    Related Issues: N/A

    Recommendation: REVERT

    PR #71244 introduced a logic bug in the merge transaction flow that prevents the tax rate section from appearing when merging expenses that were created without tax rates initially, even when one expense is later assigned a tax rate.

    Labels: No label changes needed - keeping DeployBlockerCash as this is a frontend bug requiring an App PR fix.

    📋 Detailed Analysis

    Evidence

    The bug report describes a specific scenario where the tax rate section is missing when merging two expenses:

    • Both expenses were created WITHOUT tax rates initially (Step 4)
    • Taxes were enabled on the workspace (Step 6)
    • One expense was assigned a 5% tax rate (Step 8)
    • When merging, the tax rate section is missing (Step 10)

    This matches exactly with the changes introduced in PR #71244, which added tax rate support to the merge transaction flow.

    Verification

    The PR modifies these key files related to merge transactions and tax handling:

    • src/libs/MergeTransactionUtils.ts - Core merge logic
    • src/pages/TransactionMerge/DetailsReviewPage.tsx - Details review page
    • src/pages/TransactionMerge/ConfirmationPage.tsx - Confirmation page
    • src/components/ReportActionItem/MoneyRequestView.tsx - Display logic

    All of these files are directly related to the affected merge transaction flow and tax display.

    Root Cause

    The bug is in src/libs/MergeTransactionUtils.ts at lines 296-299:

    if (isTargetValueEmpty || isSourceValueEmpty || targetValue === sourceValue) {
        if (field === 'taxValue' && isTargetValueEmpty) {
            continue;  // This skips the tax field entirely!
        }

    When expenses are created without tax rates initially, the taxValue field is empty. Even after enabling taxes and assigning a rate to one expense, when merging:

    • Target transaction: empty/0% tax (created without tax)
    • Source transaction: 5% tax

    The logic checks if (field === 'taxValue' && isTargetValueEmpty) and executes continue, which:

    1. Does NOT add taxValue to mergeableData (auto-selection)
    2. Does NOT add taxValue to conflictFields (user selection)
    3. Result: Tax rate section never appears in the merge flow

    Why the workaround works (Step 17):
    When the user manually changes the 0% tax expense to 5% and back to 0%, the transaction now has taxValue explicitly set (even as "0%"), so isTargetValueEmpty becomes false, and the tax field is properly processed and displayed.

    This is a regression introduced by the special case handling for tax values in the merge logic.

  8. 61 remaining items

  9. melvin-bot commented on Jul 1, 2026

    @melvin-bot

    @youssef-lr, @dominictb 12 days overdue. Walking. Toward. The. Light...

  10. added
    Weekly
    and removed
    Daily
    on Jul 4, 2026
  11. melvin-bot commented on Jul 4, 2026

    @melvin-bot

    This issue has not been updated in over 14 days. @youssef-lr, @dominictb eroding to Weekly issue.

  12. youssef-lr commented on Sep 2, 2026

    @youssef-lr
    Contributor

    @dominictb is this done?

  13. dominictb commented on Sep 3, 2026

    @dominictb
    Contributor

    Not yet. This needs your confirmation #83098 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugEngineeringExternalMonthly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions