Show credited amount and both accounts for cross-border FX reimbursements#96901
Draft
ishpaul777 wants to merge 2 commits into
Draft
Show credited amount and both accounts for cross-border FX reimbursements#96901ishpaul777 wants to merge 2 commits into
ishpaul777 wants to merge 2 commits into
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Part of [Release 1] of "Allow Companies to Pay FX Costs for Cross-Border Reimbursements". This is the NewDot piece of #655929.
When a company pays the FX conversion cost on a cross-border reimbursement, the employee is credited an amount in their own deposit currency that differs from the report (settlement) total. The reimbursement action must therefore report the credited amount (in the employee's deposit currency) rather than the report total, and name both the funding (company) and receiving (employee) accounts.
This PR:
creditedAmount,debitedAmount, andcreditedCurrencyto theReportOnyx type. These are returned from Auth in OpenApp (see the companion Auth PR), so they are also added towhitelistedReportKeys, the stable report selector, and the DebugUtils report validators.creditedAmount/creditedCurrencyto theREIMBURSEDreport action'sOriginalMessageReimbursedtype (populated by Web-Expensify'sgetDisplayInformation).iou.reimbursedCrossBorderstring ("paid {amount} from account {debit} to account {credit}") across all languages.getReimbursedMessageso that whencreditedAmountis present, it renders the cross-border message using the credited amount and both account last-4s; otherwise it falls through to the existing wording.Companion PRs:
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/655929
PROPOSAL:
Tests
Offline tests
Same as tests. The reimbursement message is derived from Onyx data already present on the report action, so it renders identically offline once the data is synced.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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