Skip to content

Scan-Amount is shown as 0 when submit to employer. #103090

Closed

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: V9.5.-2-2
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: #98871
Email or phone of affected tester (no customers): dreamnitethedragon+vegst@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redmi note 10s android 13
App Component: Money Requests

Action Performed:

  1. Launch app
  2. Create a scan expense with invalid receipt in self dm
  3. Wait till scan completes
  4. Note amount is empty and enter an amount error is shown
  5. Tap header - submit to employer - select a workspace
  6. Tap show more
  7. Note amount row is shown as 0.00

Expected Result:

Amount row must not show 0

Actual Result:

Amount is shown as 0 instead remaining empty when submit to employer.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7278123_1791225069305.Screenrecorder-2026-10-05-23-56-01-765.mp4

View all open jobs on GitHub

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 5, 2026
  2. 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/47aa517e077b2a9c265a48350e1198670d3e8d0856270d928e6cf82068417445

  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. 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.
  5. 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

  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). It isn't a true regression. The PR's new "blank amount + error" handling just doesn't reach the Submit to employer confirmation, which still shows 0.00 exactly as production does everywhere.

    Recommendation: Demote and fix forward. Don't revert. Reverting brings back $0.00 with no error on every screen.

    Fix: In StartExpenseFlows.ts:290, stop forcing isAmountSet: true when copying a failed-scan tracked expense into the draft:

    isAmountSet: !isFailedScanAmountPlaceholder(transaction),
    Investigation details

    How it happens

    1. Submit to employer calls createDraftTransactionAndNavigateToParticipantSelector (MoneyRequestHeaderSecondaryActions.tsx#L695-L710).
    2. That function copies the tracked expense into a draft and always sets isAmountSet: true (StartExpenseFlows.ts#L280-L299). This line predates the PR.
    3. The PR's isFailedScanAmountPlaceholder() returns false whenever isAmountSet is true (amountUtils.ts#L32).
    4. So both places that blank the amount fall back to 0.00:

    Why the fix is safe

    • With isAmountSet: false, the draft counts as a failed-scan placeholder, so both the display and the field go blank.
    • It won't block submitting. The missing-amount check only applies to manual requests unless canEnterScanFieldsManually is on, and the invalid-amount check only runs when isAmountSet is true.
    • Typing an amount sets isAmountSet: true again through setMoneyRequestAmount.
    • The same draft path also serves Categorize, Share and Send to someone, so this one change covers them too.
    • Consider a test in tests/unit/hooks/useConfirmationAmount.test.tsx for a draft made from a failed-scan tracked expense.

    Other PRs checked

    All 43 PRs in Deploy Checklist: New Expensify 2026-10-04 were checked. Only the causing PR touches the amount display or the draft-copy code. perf: index 1:1 chats by participants instead of scanning reports on confirmation mount edits IOURequestStepConfirmation.tsx, but only how chats are looked up.

    Impact: Cosmetic, one path, no data loss. After the expense lands on the workspace, the expense view shows blank plus the error, because the server doesn't store isAmountSet.

    Assignment: The PR author, x-dev90, should be added to this issue.

  8. puneetlath commented on Oct 5, 2026

    @puneetlath
    Contributor

    Seems minor in a uncommon flow. I'm going to demote.

  9. x-dev90 commented on Oct 6, 2026

    @x-dev90
    Contributor

    @arosiclair, This case wasn’t discussed in issue #94494 or during PR #98871, and the PR changes don’t address the Submit to employer behavior. Please assign it to me, and I’ll open a PR. Thanks!

  10. arosiclair commented on Oct 9, 2026

    @arosiclair
    Contributor

    I think this case is fine. Closing this out

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.Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions