-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invert amount money request amount from negative to positive and vice-versa #18783
Conversation
@luacmartins @sobitneupane One of you needs to 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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment
src/libs/ReportUtils.js
Outdated
if (moneyRequestReport) { | ||
return moneyRequestReport.total; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? Don't we still want to run the logic below for moneyRequestReports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yes. You're right!
I see some unit tests failing too |
@mollfpr unit tests are failing |
@luacmartins Fixed the failing Jest! |
@mollfpr conflicts 😢 |
Minor conflict fixed 🚀 |
Reviewer Checklist
Screenshots/VideosAdding only Web WebScreen.Recording.2023-05-12.at.1.16.45.PM.movMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
@mollfpr can we update this new line too? The ReportPreview is showing the wrong amount
|
@luacmartins Great find! Yes, we can use the |
✋ 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/luacmartins in version: 1.3.14-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.14-14 🚀
|
state: CONST.REPORT.STATE.SUBMITTED, | ||
stateNum: CONST.REPORT.STATE_NUM.PROCESSING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, the state
and stateNum
set optimistically are not the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are not really using state
, are we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong PR to leave this comment
Details
Based on the information, the negative values for the Expense report total will be displayed as a positive values and vice-versa. For the IOU report total remains the same.
In building the Expense report optimistic data, the total amount should be negative too.
Also, in the IOU actions we should subtract the total for the Expense report when requesting money. In this way, we will not see the total reduced for a few seconds before getting the correct total from the database.
Screen.Recording.2023-05-11.at.22.06.44.mov
Fixed Issues
$ #18749
Tests
Prerequisite
Offline tests
Same as the Tests
QA Steps
Same as the Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
18749.Web.mov
Mobile Web - Chrome
18749.mWeb.Chrome.mov
Mobile Web - Safari
18749.mWeb.Safari.mp4
Desktop
18749.Desktop.mov
iOS
18749.iOS.mp4
Android
18749.Android.mov