Skip to content

[HOLD https://github.com/Expensify/App/issues/60214] [$250] Expense - Submit button on expense preview shows 0.00 after categorizing expense #60081

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.1.26-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+sd3480@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Have a workspace with "Delay submissions" and "Add approvals" enabled.
  • Have self DM. (please try Create an unreported expense on OD to trigger self DM in ND).
  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Track an expense in self DM.
  4. Click Categorize it.
  5. Select a category, enter merchant and submit the expense.

Expected Result:

Submit button on expense preview will not show 0.00 after categorizing expense.

Actual Result:

Submit button on expense preview shows 0.00 after categorizing expense.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6798965_1744334722232.20250411_092025.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021910683588619929607
  • Upwork Job ID: 1910683588619929607
  • Last Price Increase: 2025-04-11
Issue OwnerCurrent Issue Owner: @hoangzinh

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 11, 2025
  2. melvin-bot commented on Apr 11, 2025

    @melvin-bot

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

  3. bernhardoj commented on Apr 11, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Submit button shows 0 when using table report view.

    What is the root cause of that problem?

    We always show the amount of the report.

    {shouldShowSubmitButton && (
    <Button
    success={isWaitingForSubmissionFromCurrentUser}
    text={translate('iou.submitAmount', {amount: getSettlementAmount()})}
    style={buttonMaxWidth}

    The amount is 0 because it's a track expense, so the reimbursable spend is 0.

    return convertToDisplayString(reimbursableSpend, iouReport?.currency);
    };

    If we compare it with ReportPreview, we never show the amount for the submit button.

    {shouldShowSubmitButton && (
    <Button
    success={isWaitingForSubmissionFromCurrentUser}
    text={translate('common.submit')}

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

    Follow the ReportPreview by not showing the amount.

    OR

    Return empty string if the amount is 0.

    OR

    When submitting, I think it makes sense to show even the non reimbursable amount. So, just like here, where we only exclude non-reimbursable for pay action when calculating the non-held amount, we can do the same for getSettlementAmount.

    const {nonHeldAmount, fullAmount, hasValidNonHeldAmount} = getNonHeldAndFullAmount(iouReport, shouldShowPayButton);

    return convertToDisplayString(shouldShowPayButton ? reimbursableSpend : totalDisplaySpend, iouReport?.currency);
    

    or just use fullAmount

    return fullAmount;
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    If we go with the 2nd solution, we can render MoneyRequestReportPreviewContent and make sure the amount doesn't show if it's 0.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 11, 2025
  5. changed the title [-]Expense - Submit button on expense preview shows 0.00 after categorizing expense[/-] [+][$250] Expense - Submit button on expense preview shows 0.00 after categorizing expense[/+] on Apr 11, 2025
  6. melvin-bot commented on Apr 11, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 11, 2025
  8. melvin-bot commented on Apr 11, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External)

  9. hoangzinh commented on Apr 15, 2025

    @hoangzinh
    Contributor

    Thanks for posting the proposal @bernhardoj. I will try to review it today or tomorrow.

  10. hoangzinh commented on Apr 16, 2025

    @hoangzinh
    Contributor

    The amount is 0 because it's a track expense, so the reimbursable spend is 0.

    Hi @bernhardoj could you help me understand it? I think it's probably a BE issue, when we categorize a track expense, it should set nonReimbursableTotal of iouReport to 0, shouldn't it?

  11. bernhardoj commented on Apr 17, 2025

    @bernhardoj
    Contributor

    If we categorize a track expense of $5, the nonReimbursableTotal would be -500 because track expense is not reimbursable. The total is also -500.

  12. hoangzinh commented on Apr 17, 2025

    @hoangzinh
    Contributor

    @bernhardoj I see. I asked experts on Slack, awaiting their thoughts

  13. 1 remaining item

  14. added and removed on Apr 17, 2025
  15. mountiny commented on Apr 17, 2025

    @mountiny
    Contributor

    Putting this on hold for more general issue that should solve this #60214

  16. melvin-bot commented on Apr 24, 2025

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  17. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 2, 2025
  18. melvin-bot commented on May 19, 2025

    @melvin-bot

    This issue has not been updated in over 15 days. @hoangzinh, @maddylewis eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  19. maddylewis commented on Jul 8, 2025

    @maddylewis
    Contributor

    this issue was closed/merged awhile back #60214 / closing.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions