Fix transaction amount sign and clean up unnecessary pay money request transaction #24613
Conversation
…he amount sign in case of expense reports
|
@sobitneupane 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] |
luacmartins
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the fix!
Reviewer Checklist
Screenshots/VideosWeb
iou.mov
iou.offline.request.moviou.offline.pay.mov
expense.mov
expense.offline.movMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
After paying expense request with description, I noticed that ReportPreview is missing description on admin side but shows correctly on employee side. Is it bug or expected? Screen.Recording.2023-08-16.at.11.58.01.PM.mov |
|
@joelbettner 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] |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@situchan Thanks for thorough testing |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.55-0 🚀
|
|
We are facing an issue when running this PR Steps:
|
trim.2D5ED99B-E294-4116-B31F-BA8FA53BEC43.MOV |
|
I have created an issue and PR with a fix for this here #25473 thanks |
|
Thanks @mountiny. This looks like a follow-up issue and not a deploy blocker to me. Checking it off the list. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.56-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|




Details
When creating an expense tied to policy the amount in transaction object should be negative (or opposite sign of what was requested)
Also noticed that we were incorrectly creating new transaction when paying money request and the original message of the pay money request action is also not the same as in the backend. Cleaned it up here.
Fixed Issues
$ #24610
Tests
Test the P2P IOU money request and payment between two users
Verify all works fine and you dont see any new console errors.
Test the payment on the workspace by having an admin and and employee set up and pay elsewhere
Verify all works fine and don't see any new console errors.
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
this is purely a logic change so in sake of focus and urgency I am skipping some of the platform screenshots
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android