Skip to content

Scan - Empty amount changes to "0,00" when expense has deleted/undeleted status. #103056

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.2-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: #98871
Email or phone of affected tester (no customers): ibellicotest+3215@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has a workspace.

  1. Open the Expensify app.
  2. Naviagte to workspace chat.
  3. Create a scan expense with a receipt/image that will fail SmartScan.
  4. Wait until the scan fails.
  5. Open the expense details.
  6. Note that the Amount field is empty instead of showing $0.00.
  7. Navigate to "Spend" > "Expenses"
  8. Note that expense preview doesn´t show any amount instead of showing "0,00"
  9. Select and delete the expense.
  10. Tap on the filters icon > "Status" > "Deleted"
  11. Apply the filter.
  12. Note that now, expense preview shows "0,00" on preview, instead of showing an empty space.
  13. Select and undelete the expense.
  14. Clear the filter.
  15. Note that expense still shows "0,00" as amount on preview, different to state before being deleted.

Expected Result:

Amount field on report and on preview, should remain empty on failed scan expense after being deleted and undeleted.

Actual Result:

Amount field on report and on preview, changes from empty state to "0,00" when expense has "Deleted" or "Undeleted" status.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7277775_1791206058879.0_Scan_9.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7277775

Issue OwnerCurrent Issue Owner: @x-dev90

Activity

  1. applause-bot commented on Oct 5, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/45a4c973ae83479a61d94c532c9dce4e89417a74531e37273e24945bf78a7814

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 5, 2026
  3. melvin-bot commented on Oct 5, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    @arosiclair @Ollyws you have been assigned to this deploy blocker because you reviewed the offending PR: #98871

  5. github-actions commented on Oct 5, 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.
  6. melvin-bot commented on Oct 5, 2026

    @melvin-bot

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

  7. MelvinBot commented on Oct 5, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: fix: show scan error instead of populating $0 amount when scan fails (high confidence).

    Recommendation: demote, don't revert. This is not a regression compared to production. Production shows "0,00" for a failed scan in every state. The PR made the amount blank for failed scans. After delete/undelete, the expense falls back to the old production behavior ("0,00"). Reverting would bring back "$0.00 with no error" for every failed scan, which is worse. Fix it forward as a follow-up to [$300] Scan - When the scan fails, the amount field is filled with $0, error is not shown.

    Investigation details

    Why this PR: It added isFailedScanAmountPlaceholder() in src/libs/TransactionUtils/amountUtils.ts:14-33. The amount is blank only when all of these are true:

    • iouRequestType is SCAN
    • receipt.state is SCANFAILED, or OPEN with an unconfirmed amount or a pending field edit
    • amount is 0 or undefined
    • there is no valid modifiedAmount, and isAmountSet is not set

    It is used in:

    Why delete/undelete breaks it: The App does not change the fields this check reads on delete or undelete. The optimistic undelete update only changes reportID, comment and originalAmount/originalCurrency (src/libs/actions/Transaction.ts:1181-1195). So the transaction the server returns after delete/restore most likely fails the check. The likely cause is that receipt.state moves from SCANFAILED to OPEN, or a modified amount gets set. Not verified: I could not reproduce this live, because it needs a real SmartScan failure.

    Other PRs ruled out: None of the other PRs on Deploy Checklist: New Expensify 2026-10-04 touch amount display, Search rows, delete/undelete, or receipt state.

    Suggested fix forward:

    1. Compare receipt.state, modifiedAmount and isAmountSet on the transaction before delete and after undelete.
    2. Then either keep the scan-failed state on restore (backend), or widen the check to recognize a restored failed-scan transaction (App).
    3. Add a unit test for a failed-scan transaction that went through delete and undelete.

    Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.


    view run

  8. arosiclair commented on Oct 5, 2026

    @arosiclair
    Contributor

    Recommendation: demote, don't revert. This is not a regression compared to production.

    Agreed

  9. x-dev90 commented on Oct 6, 2026

    @x-dev90
    Contributor

    @arosiclair, The delete/undelete behavior wasn’t discussed as part of issue #94494 or PR #98871, and the changes in that PR weren’t intended to handle this case. Please assign it to me, and I’ll open a PR to address it. Thanks!

  10. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    @arosiclair, @Ollyws Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    @arosiclair — to hire @x-dev90 on Upwork, add the External label so a job is created and the offer is sent automatically.

  12. added
    Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.
    on Oct 9, 2026
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.ReviewingHas a PR in reviewSkip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.WeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions