Skip to content

[Due for payment 2026-03-19] [$250] Reimbursable and Non-reimbursable total appear and disappear after changing reimbursable status #81939

Closed

Description

@mitarachim

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.16-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #80079
Email or phone of affected tester (no customers): soidjniosjdosjosidj@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.Go to workspace chat.
  2. Create an expense in foreign currency.
  3. Open the expense report.
  4. Disable Reimbursable toggle.
  5. Enable Reimbursable toggle.

Expected Result:

Either Reimbursable or Non-reimbursable total will appear in Total section.

Actual Result:

Reimbursable and Non-reimbursable total appear and disappear together after changing reimbursable status.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7073256_1770709579561.3.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022028954463895695977
  • Upwork Job ID: 2028954463895695977
  • Last Price Increase: 2026-03-10

Activity

  1. daledah commented on Feb 10, 2026

    @daledah
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Actual Result:
    Reimbursable and Non-reimbursable total appear and disappear together after changing reimbursable status.

    What is the root cause of that problem?

    The condition for displaying the reimbursable/non-reimbursable breakdown in the Total section uses && operator, which requires BOTH values to be non-zero.

    const shouldShowBreakdown = (nonReimbursableSpend && reimbursableSpend) || !!billableTotal || !!taxTotal;

    {label: 'cardTransactions.outOfPocket', value: formattedOutOfPocketAmount, show: !!nonReimbursableSpend && !!reimbursableSpend},
    {label: 'cardTransactions.companySpend', value: formattedCompanySpendAmount, show: !!nonReimbursableSpend && !!reimbursableSpend},

    When there's only one expense and you toggle reimbursable:

    • If reimbursable: reimbursableSpend > 0 but nonReimbursableSpend = 0
    • If non-reimbursable: nonReimbursableSpend > 0 but reimbursableSpend = 0

    Because of the && condition, both rows appear/disappear together instead of showing independently.

    What changes do you think we should make in order to solve the problem?

    Change the condition to use || instead of && for the breakdown visibility, and show each row independently:

    - const shouldShowBreakdown = (nonReimbursableSpend && reimbursableSpend) || !!billableTotal || !!taxTotal;
    + const shouldShowBreakdown = !!nonReimbursableSpend || !!reimbursableSpend || !!billableTotal || !!taxTotal;

    And update the individual row conditions:

    - {label: 'cardTransactions.outOfPocket', value: formattedOutOfPocketAmount, show: !!nonReimbursableSpend && !!reimbursableSpend},
    - {label: 'cardTransactions.companySpend', value: formattedCompanySpendAmount, show: !!nonReimbursableSpend && !!reimbursableSpend},
    + {label: 'cardTransactions.outOfPocket', value: formattedOutOfPocketAmount, show: !!reimbursableSpend},
    + {label: 'cardTransactions.companySpend', value: formattedCompanySpendAmount, show: !!nonReimbursableSpend},

    What alternative solutions did you explore? (Optional)

    N/A

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 3, 2026
  3. melvin-bot commented on Mar 3, 2026

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (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.

  4. MelvinBot commented on Mar 3, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When toggling the reimbursable status of an expense in a report, both the "Reimbursable" and "Non-reimbursable" total rows in the breakdown section appear and disappear together, rather than showing independently based on whether each type of expense exists.

    What is the root cause of that problem?

    In MoneyReportView.tsx, both breakdown rows use the identical show condition — !!nonReimbursableSpend — so they are always coupled:

    https://github.com/Expensify/App/blob/main/src/components/ReportActionItem/MoneyReportView.tsx#L235-L236

    {label: 'cardTransactions.outOfPocket', value: formattedOutOfPocketAmount, show: !!nonReimbursableSpend},
    {label: 'cardTransactions.companySpend', value: formattedCompanySpendAmount, show: !!nonReimbursableSpend},
    

    Because both rows gate their visibility on nonReimbursableSpend, when you toggle a single expense to non-reimbursable, both rows appear simultaneously (including a "Reimbursable: $0.00" row). When you toggle it back to reimbursable, nonReimbursableSpend drops to 0 and both rows vanish simultaneously.

    The same coupling exists in the newer MoneyRequestReportTransactionList.tsx, where both rows use the same shouldShowExpenseReportBreakDown condition:

    https://github.com/Expensify/App/blob/main/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx#L702-L703

    Note: The shouldShowBreakdown variable itself is not the problem — it already correctly uses || to determine whether the breakdown section renders. The issue is specifically in the individual row visibility conditions within that section.

    What changes do you think we should make in order to solve the problem?

    Each row should independently control its own visibility based on whether its respective spend value is non-zero:

    In MoneyReportView.tsx (line 235-236):

    • cardTransactions.outOfPocket (Reimbursable row): change show to !!reimbursableSpend
    • cardTransactions.companySpend (Non-reimbursable row): keep show as !!nonReimbursableSpend (already correct for this row)

    In MoneyRequestReportTransactionList.tsx (line 702-703):

    • Apply the same pattern: outOfPocket should show when reimbursable spend exists, companySpend should show when non-reimbursable spend exists, rather than both using the same flag.

    No changes needed to shouldShowBreakdown — it correctly triggers the breakdown section when there is non-reimbursable spend, billable amounts, or taxes.

    What alternative solutions did you explore? (Optional)

    Considered changing shouldShowBreakdown to trigger on !!reimbursableSpend || !!nonReimbursableSpend, but this would cause the breakdown to always appear whenever any expenses exist (since one of the two is always non-zero), showing redundant info like "Reimbursable: $50" alongside "Total: $50" when all expenses are reimbursable.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  5. 31 remaining items

  6. melvin-bot commented on Mar 19, 2026

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @mallenexpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  7. melvin-bot commented on Mar 19, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2028954463895695977/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  8. mallenexpensify commented on Mar 20, 2026

    @mallenexpensify
    Contributor

    Lotta comments on the PR, what's status here @rojiphil ?
    #84792 (comment)

  9. rojiphil commented on Mar 21, 2026

    @rojiphil
    Contributor

    Lotta comments on the PR, what's status here @rojiphil ?

    @mallenexpensify I think this is due payment now.
    We had originally fixed this issue as per this PR. However since we wanted to align with OD completely as mentioned here, we implemented a follow-up PR here. This has been in production since 13 Mar.
    Further, QA also clarified another issue, which is unrelated.

  10. rojiphil commented on Mar 21, 2026

    @rojiphil
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      No offending PR as we decided to align ourselves completely with OD

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: Not Required

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template

    Regression Test Proposal

    Precondition:

    Test:

    1. Go to a workspace chat where taxes are enabled
    2. Create a single reimbursable expense with a non-zero tax rate (e.g., 5%)
    3. Open the expense report
    4. Verify the "Reimbursable" row does not appear in the breakdown (only Tax should appear)
    5. Create a second expense and toggle it to non-reimbursable
    6. Verify both "Reimbursable" and "Non-reimbursable" rows now appear in the breakdown
    7. Toggle the second expense back to reimbursable
    8. Verify only the Tax row remains in the breakdown

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-ef6f-a83f-d173-348cb4a39af4
  11. mallenexpensify commented on Mar 23, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @rojiphil due $250 via NewDot

    Thx @rojiphil, think we're all set. comment/reopen, if needed.

  12. quinthar commented on Apr 13, 2026

    @quinthar
    Contributor

    Approved $250 to @rojiphil

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions