Repository navigation
Fix - Negative expenses appearing with positive amount in UnreportedExpenseListItem - #99913
Conversation
|
@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Created based on #98627 (comment) @madmax330 for 👀 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
Tests make sense to me.
|
bump @madmax330 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 madmax330 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.4.66-0 🚀
|
|
🤖 No help site changes required. This PR is a display-only bug fix — it passes Why no docs updateThe only article covering this flow is I also searched Because no changes were needed, I did not create a draft help site PR, apply the One unrelated observation, out of scope for this PR: the article says |
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.4.68-0 🚀
|
|
No help site changes are required, so I did not create a docs PR. This PR is a display-only bug fix. It passes the transaction's Nothing user-facing changed in a way the help site documents:
The one article that covers this flow is already accurate. Live UI verificationOn an empty workspace expense report, the Add expense dropdown contains Create expense, Track distance, and Add existing expense:
The report header's More menu contains Add expense as a submenu with the same three options, which is the path the article documents:
Worth noting: Add expense also appears as a button directly on the empty report body, so the article's More path is correct but not the only route. That is pre-existing and unrelated to this PR, so I left it alone. @FitseTLT, no help site PR was needed here. If you think a doc should call out how negative amounts display, reply and I'll draft one. view run · no recording available |
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.4.68-1 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
TotalCelldecides whether an amount may render as negative fromeffectiveReport/effectivePolicy, which fall back totransactionItem.report/transactionItem.policy. In the Add existing expense RHP,UnreportedExpenseListItemrenderedTransactionItemRowwithout passing either, and the search-list transaction items carry no nested report or policy — soisFromExpenseReportevaluatedfalseandgetAmountreturnedMath.abs(...), showing a negative expense as positive.This resolves the transaction's own report from Onyx and its policy via
usePolicy, then passes both toTransactionItemRow.TotalCellnow sees a real report/policy,isFromExpenseReportis correct, and the stored sign is preserved. Only this list item changes; every otherTransactionItemRowcaller already supplied these props.Fixed Issues
$ #98627 (comment)
PROPOSAL: N/A
Tests
-$5.00), not positive.Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
2026-08-31.17-07-48.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
2026-08-31.17-26-05.mp4