fix - Expense - "x per person" is shown on confirm page but missing in transaction thread - #67086
Conversation
| shouldDisplayTransactionAmount && ((hasReceipt && !isTransactionScanning && didReceiptScanSucceed) || isPerDiemRequest) | ||
| ? convertToDisplayString(transactionAmount / (transactionAttendees?.length ?? 1), transactionCurrency) | ||
| : ''; | ||
| const formattedPerAttendeeAmount = shouldDisplayTransactionAmount ? convertToDisplayString(transactionAmount / (transactionAttendees?.length ?? 1), transactionCurrency) : ''; |
There was a problem hiding this comment.
@c3024 I removed is receipt scanning check because it prevents the per-person from being shown in case of replacing the receipt of receipt request. But the changed receipt value doesn't affect the amount of the transaction; the amount stays at the first set value so we should display the per-person as long as there is an amount to display.
There was a problem hiding this comment.
It used to be like this but there was a PR that added this extra check for receipt scanning. I saw that when I was checking the proposals. I think this was added for cases of failed scan requests with invalid receipts. We should ensure that the flows that required this addition are not broken. I will try finding that PR.
There was a problem hiding this comment.
But for failed receipt the amount if falsy so the current condition still works.
There was a problem hiding this comment.
Yea, that's correct. It looks like this PR added other checks to the existing shouldDisplayTransactionAmount only check. I tested all the cases mentioned there and have not found anything broken with this change. I think we can go with the standalone shouldDisplayTransactionAmount check. 🤞
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppattendeeAndroid.movAndroid: mWeb ChromeattendeeAndroidmWeb.moviOS: HybridAppattendeeiOS.moviOS: mWeb SafariattendeeiOSmWeb.movMacOS: Chrome / SafariattendeeChrome.movMacOS: DesktopattendeeDesktop.mov |
|
✋ 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/nkuoch in version: 9.1.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.1.88-3 🚀
|
Details
Fixed Issues
$ #65942
PROPOSAL: #65942 (comment)
Tests
Precondition:
"Attendee tracking" is enabled in Rules.
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop