fix: Pay button show original amount in approved report after splitting amount again in 1st report#76479
Conversation
…ng amount again in 1st report
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@dukenv0307 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-12-03.at.00.25.58.movAndroid: mWeb ChromeScreen.Recording.2025-12-03.at.00.22.04.moviOS: HybridAppScreen.Recording.2025-12-03.at.00.28.15.moviOS: mWeb SafariScreen.Recording.2025-12-03.at.00.23.23.movMacOS: Chrome / SafariScreen.Recording.2025-12-03.at.00.19.36.mov |
src/libs/actions/IOU.ts
Outdated
| const failureData = [] as OnyxUpdate[]; | ||
| const optimisticData = [] as OnyxUpdate[]; | ||
|
|
||
| // Before the loop (around line 14388) |
There was a problem hiding this comment.
Before the loop what? This comment is not very helpful
There was a problem hiding this comment.
@NikkiWines I removed. I don't see this when coping the PERF suggestion
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Fine from a product perspective 👍
| for (const expense of splitExpenses) { | ||
| if (expense.reportID) { | ||
| const currentTotal = reportTotals.get(expense.reportID) ?? 0; | ||
| reportTotals.set(expense.reportID, currentTotal - (expense.amount ?? 0)); | ||
| } |
There was a problem hiding this comment.
Can you add a comment about why this loop is necessary
|
@nkdengineer you've got a test failure |
|
✋ 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/NikkiWines in version: 9.2.75-0 🚀
|
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.2.75-0 🚀
|
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.2.77-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.2.77-1 🚀
|
Explanation of Change
fix: Pay button show original amount in approved report after splitting amount again in 1st report
Fixed Issues
$ #75622
PROPOSAL: #75622 (comment)
Tests
Precondition : Create a workspace with Delay submission disabled and Add approvals enabled
Offline tests
Same
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Screen.Recording.2025-12-02.at.11.09.36.mov
Android: mWeb Chrome
Screen.Recording.2025-12-02.at.11.08.40.mov
iOS: Native
Screen.Recording.2025-12-02.at.11.11.18.mov
iOS: mWeb Safari
Screen.Recording.2025-12-02.at.11.10.34.mov
MacOS: Chrome / Safari
Screen.Recording.2025-12-02.at.11.07.15.mov