-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix: Amount shows 0.00 in invoice report and LHN #50620
Conversation
The currency is being updated correctly in the header, €123 should be $134.60 but it's just updating to $123 Screen.Recording.2024-10-13.at.18.06.54.mov |
@Ollyws, we need to wait for BE to update the expense report's total. |
For me the backend is returning the data but it's not updating, but perhaps this is out of scope for this issue let me investigate further. |
@nkdengineer The value updates fine when we change the amount when it's the current workspace currency, but only updates after a page refresh if we change the currency or subsequently the amount: Screen.Recording.2024-10-16.at.12.42.17.mov |
@Ollyws For me, the amount is updated after the update API is complete. When we update the amount with the WS currency, it's updated immediately because the Screen.Recording.2024-10-16.at.17.14.24.movBesides, did BE return the updated total for you like this video? Screen.Recording.2024-10-16.at.17.17.46.mov |
@nkdengineer Yes but the BE seems to be returning the value in the chosen currency, not the workspace currency: Screen.Recording.2024-10-17.at.12.08.02.mov |
@Ollyws The total I mean here the total of the expense report which is the reportID you opened in the video above. Because the amount in header is based on the total of the expense report. Also I don't see BE returns the update data of the expense report for you in this case. |
@nkdengineer Ah yes sorry for the confusion, the backend doesn't seem to be returning the total for the report after changing the currency...but I wonder why it seems to be working for you. |
@Ollyws Sometimes I face the same problem, it may be a BE problem and we can ignore. |
@nkdengineer Can you confirm that you actually get an updated total from the backend? I can't find any instance in which the backend returns a new total after changing the currency, on staging or prod. |
@Ollyws It's updated with the normal submit expense and for send invoice I also face the same problem. |
Ah I see so what solution do you suggest here? |
@Ollyws How can we suggestion the solution here since it's the BE bug? For this case the total will be updated after we refresh the page. |
Ok I suppose we're good to proceed but this should really be fixed on the backend too. |
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
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.
@arosiclair
The backend is not returning the updated total and currency for the report in the response to the UpdateMoneyRequestAmountAndCurrency
, it’s only updated in OpenApp
when we refresh the page.
So currently this won’t actually update the total and we will need some changes on the backend to get it working.
Sounds like a legit bug. Can you report it in |
@arosiclair Sure, will do. |
@arosiclair looks like this was merged without a test passing. Please add a note explaining why this was done and remove 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/arosiclair in version: 9.0.53-0 🚀
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.0.53-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.53-1 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.53-1 🚀
|
Details
Fixed Issues
$ #50236
PROPOSAL: #50236 (comment)
Tests
Offline tests
same as above
QA Steps
same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
android-resize.mp4
Android: mWeb Chrome
android-mweb-resize.mp4
iOS: Native
ios-resize.mp4
iOS: mWeb Safari
ios-mweb-resize.mp4
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
desktop-resize.mp4