Skip to content

Expense - Negative amount can be paid when there is held expense, which leads to error #72141

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.2.28-0
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: #65001
Email or phone of affected tester (no customers): applausetester+sdosdijodsjnois1@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Delayed submissions and Add approvals are disabled.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a negative expense (amount: -10) in workspace chat.
  4. Create an expense (amount: 30) in workspace chat.
  5. Open expense report.
  6. Hold the expense with positive amount (amount:30).
  7. Click Submit.
  8. Click Mark as paid.
  9. Click Pay only -10.00.

Expected Result:

App will not show the option to pay the negative amount.

Actual Result:

App shows the option to pay the negative amount and it throws error.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6969087_1759961937267.Screen_Recording_2025-10-09_at_06.14.41.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Oct 8, 2025
  2. melvin-bot commented on Oct 8, 2025

    @melvin-bot

    Triggered auto assignment to @joekaufmanexpensify (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. melvin-bot commented on Oct 8, 2025

    @melvin-bot

    Triggered auto assignment to @marcochavezf (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Oct 8, 2025

    @melvin-bot

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

  5. github-actions commented on Oct 8, 2025

    @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. removed
    DeployBlockerIndicates it should block deploying the API
    on Oct 9, 2025
  7. 18 remaining items

  8. kubabutkiewicz commented on Oct 16, 2025

    @kubabutkiewicz
    Contributor

    I checked on the classic and it seems to be possible so do you know why the requests are not passing @nkuoch ? this is the request id 98f76e6b483770bb-LAX

  9. nkuoch commented on Oct 18, 2025

    @nkuoch
    Contributor

    98f76e6b483770bb-LAX is calling PayMoneyRequest

    Processing 'PayMoneyRequest' for 'expensify.com' from '89.65.152.32' ~~ command: 'PayMoneyRequest' iouReportID: '3485198879487379' chatReportID: '1341027226624011' reportActionID: '3333931644702381286' paymentMethodType: 'Elsewhere' full: 'false' amount: '12300' optimisticHoldReportID: '3109138896013566' optimisticHoldActionID: '8083472241709063055' optimisticHoldReportExpenseActionIDs: '[{"optimisticReportActionID":"5736696973965742345","oldReportActionID":"1594318296741434573"}]' pusherSocketID: '865879.6658726' authToken: '' referer: 'ecash' platform: 'web' api_setCookie: 'false' email: 'jakub.butkiewicz+9999@callstack.com' isFromDevEnv: 'true'

    So it's throwing with

    406 report has negative total

  10. kubabutkiewicz commented on Oct 20, 2025

    @kubabutkiewicz
    Contributor

    So I need help what we should do on the frontend now, should we disable completely option for paying ? so then the button Mark ${negative value} as paid will be inactive. Or should we allow users to pay only to pay total which in case of the video from the issue will be $20?

  11. nkuoch commented on Oct 20, 2025

    @nkuoch
    Contributor

    oh, sorry, maybe I can do a back end fix to allow marking a negative report as paid: https://github.com/Expensify/Auth/pull/17730

  12. joekaufmanexpensify commented on Oct 22, 2025

    @joekaufmanexpensify
    Contributor

    Backend PR merged

  13. melvin-bot commented on Oct 22, 2025

    @melvin-bot

    @lakchote @pasyukevich @kubabutkiewicz @joekaufmanexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  14. joekaufmanexpensify commented on Oct 23, 2025

    @joekaufmanexpensify
    Contributor

    @kubabutkiewicz the backend PR was deployed.

  15. kubabutkiewicz commented on Oct 24, 2025

    @kubabutkiewicz
    Contributor

    Looks like its working now,

    Image
  16. joekaufmanexpensify commented on Oct 27, 2025

    @joekaufmanexpensify
    Contributor

    Great. Closing this out as I think it's all set. LMK if anything else is needed!

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions