-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Error message displayed for split distance created in Korean Won currency #52310
Comments
Triggered auto assignment to @OfstadC ( |
I found there is a difference between total amount and split shares: transaction:
Object
amount: 519357 /////// not rounded
attendees: [Object] (1)
billable: false
category: ""
comment: {waypoints: Object, customUnit: {customUnitRateID: "_FAKE_P2P_ID_", quantity: 4281.895}, isLoading: false}
created: "2024-11-12"
currency: "KRW"
errorFields: {}
iouRequestType: "distance"
isFromGlobalCreate: false
merchant: "4.28 km @ ₩1213.45 / km"
participants: [{accountID: 18602521, selected: true}] (1)
participantsAutoAssigned: true
pendingFields: {}
reportID: "4715962770440927"
routes: {route0: Object}
shouldShowOriginalAmount: false
splitPayerAccountIDs: [18608989] (1)
splitShares: Object
/////////////// rounded here below
18602521: {amount: 259700, isModified: false}
18608989: {amount: 259700, isModified: false}
Object 견본
transactionID: "1" App/src/pages/iou/request/step/IOURequestStepDistance.tsx Lines 144 to 153 in 64cb4ee
There is code for decision how the total is same with split shares. I tried to round total amount from |
ProposalPlease re-state the problem that we are trying to solve in this issue.The sum of splits must equal the total amount error message displayed and split button non functional What is the root cause of that problem?The total amount is calculated by Line 7661 in 64cb4ee
The total amount of the split bill is rounded before we calculate the split amount Line 51 in 64cb4ee
then if the rounded total amount is different from the current amount, the error appears here App/src/components/MoneyRequestConfirmationList.tsx Lines 452 to 454 in 64cb4ee
What changes do you think we should make in order to solve the problem?When calculating the split amount, we should remove the
Line 51 in 64cb4ee
What alternative solutions did you explore? (Optional) |
@OfstadC This bug also happens for some other currencies like |
Added to Quality and posted in Slack for prioritization |
Does this only affect distance expenses, or does it happen to any split? |
This only affects distance expense, the reason is the rate is odd. |
Will test this a bit more first thing tomorrow morning - had a managed customer issue that threw my day off today 😓 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.59-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @jacobkim9881
Slack conversation (hyperlinked to channel name): ts_external_expensify_open_source
Action Performed:
Prerequisite: Default currency in Korean Won
Expected Result:
Amount equally split and user able to click split button to submit the expense
Actual Result:
The sum of splits must equal the total amount
error message displayed and split button non functionalWorkaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
2024-11-08.7.14.00.mov
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: