-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix bugs for selfDM splits feature #92055
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
Open
ZhenjaHorbach
wants to merge
38
commits into
Expensify:main
Choose a base branch
from
ZhenjaHorbach:fix-bugs-with-selfDM-splits
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
7d22b03
Merge the first bunch of fixes
ZhenjaHorbach 0600e38
Fix conflicts
ZhenjaHorbach a88c95a
Add fix for 91907
ZhenjaHorbach 56fc7d1
Add fix for 91920
ZhenjaHorbach db9ac60
Fix conflicts
ZhenjaHorbach b4a8331
Add fix for 91917
ZhenjaHorbach b865cad
Fix conflicts
ZhenjaHorbach 12d104c
Fix conflicts
ZhenjaHorbach f5a75fb
Refactor code
ZhenjaHorbach 7477e46
Refactor code x2
ZhenjaHorbach 57e546e
Refactor code x3
ZhenjaHorbach 8378193
Fix comments with new selector for hasWorkspaceToSubmitTo and policy …
ZhenjaHorbach ac85f9f
Fix comments
ZhenjaHorbach b13de09
Fix conflicts
ZhenjaHorbach 61aa7c9
Fix comments, new bugs and improve fix for 91917
ZhenjaHorbach eb19860
Improve logic for selfdm rates
ZhenjaHorbach 1e8d7c7
Improve logic for rates and add shouldSelectPolicy
ZhenjaHorbach 4bc6e57
Fix bug with zero amount after creating worksapce in selfDM splits flow
ZhenjaHorbach 5be0b7e
Fix comments and implement clearErrorWithOriginalTransaction
ZhenjaHorbach 3d1fb50
Rename clearErrorWithOriginalTransactionError
ZhenjaHorbach 464842f
Fix lint issues
ZhenjaHorbach 2eff98f
Fix comments
ZhenjaHorbach 95d5a44
Fix conflicts
ZhenjaHorbach 0398f5e
Fix comments
ZhenjaHorbach 4decb7b
Fix conflicts
ZhenjaHorbach 20e4e35
Fix fmt issues
ZhenjaHorbach 7ed9083
Fix issues from review comments
ZhenjaHorbach 1214e45
Fix spellcheck issues
ZhenjaHorbach 2965da0
Fix conflicts
ZhenjaHorbach 627c7e8
Fix TS issues
ZhenjaHorbach d4685ed
Fix conflicts
ZhenjaHorbach eeca781
Fix lint issues
ZhenjaHorbach 61ebdd4
Merge branch 'main' into fix-bugs-with-selfDM-splits
ZhenjaHorbach e0c425d
Fix conflicts
ZhenjaHorbach 7b1ab32
Fix lint issues
ZhenjaHorbach 87ae568
Fix conflicts
ZhenjaHorbach c6d9b7e
Fix conflicts
ZhenjaHorbach e9cba9c
Fix comments
ZhenjaHorbach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
When the selected
customUnitRateIDis only found via the new cross-policy fallback and that rate uses a different unit, the transaction has already storednewDistanceUnitfrom the wrong/missing policy and skipped the quantity conversion above. The later amount calculation then treats the old quantity as if it were in the fallback rate's unit (for example, 10 mi becomes 10 km when selecting a km rate), so the split amount/merchant are wrong until corrected by the server, and remain wrong offline. Resolve the fallback rate before setting/convertingcomment.customUnit.distanceUnit, or redo that conversion whenrateFromAnyPolicyis used.Useful? React with 👍 / 👎.