Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.89k forks source link

Split bill - Split amount is incorrect if the amount is small #14205

Closed kavimuru closed 1 year ago

kavimuru commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Actions Performed:

  1. Login with any account that has workspace.
  2. Click on plus button, choose Split => Choose 8 members and enter small number like 2.01 , choose the currency as USD . Click Next
  3. Notice that the currency is calculated correctly, now go back and change the currency to VND and press Next.
  4. Notice that the currency of members are now showing 0đ

Expected Result:

The number of split money should show as the same with USD currency.

Actual Result:

The currency of members are now showing 0 with VND currency.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: Reproducible in staging?: 1.2.51-0 Reproducible in production?: y 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 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/211650875-b500d869-3630-4067-8e88-f315d4c917eb.mp4

https://user-images.githubusercontent.com/43996225/211650918-f3d91277-dfba-47c5-a4d6-81fb4a0ce54b.mov

Expensify/Expensify Issue URL: Issue reported by: @hungvu193 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1673325036803299

View all open jobs on GitHub

twisterdotcom commented 1 year ago

My first few of these, so taking the template from StackOverflowTeams: https://stackoverflowteams.com/c/expensify/questions/14418


Still not sure about this. Going to see how we handle these tiny currency splits in oldDot.

Possibly related issues:

  1. https://github.com/Expensify/App/issues/12517
  2. https://github.com/Expensify/App/issues/13565
twisterdotcom commented 1 year ago

In fact, even if you split d2, it's an odd UI: IMG_919491B35A4E-1

Anyway, I kind of expected this is how we handle it everywhere with a tiny currency like VND. From oldDot, you can see the difference between USD and VND:

image

The lowest denomination of VND you can even get is 100 it seems though even splitting that is odd - it gives you a split of d100, and 8 "equal" amounts of d11 (so like d88 if you sum them):

IMG_919491B35A4E-1

100 VND is also equal to just 0.0043 USD, which doesn't exist. I'm basically on the fence as to whether this is a real thing we should fix or not, as it likely requires an internal fix. Going to ask in Slack.

twisterdotcom commented 1 year ago

Asking: https://expensify.slack.com/archives/C049HHMV9SM/p1673438329495629?thread_ts=1673325036.803299&cid=C049HHMV9SM

twisterdotcom commented 1 year ago

Okay, as discussed in Slack, we're going to continue with this in the product, as it's not a real use case we expect anybody to ever encounter.