You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-09-27] [$500] Web - The amount of money is displayed inaccurately #27226
In the workspace -> create a new request for money
Click on Distance tab, choose the address for start and finish position -> press Next button
3.. As you can the distance is 3.08 Km and the amount is $307,888.00
Expected Result:
With 3.08 km, the amount has to be $308,000 because I set up $100000 per km.
Actual Result:
The amount of money is displayed wrongly
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.65.2 Reproducible in staging?: y 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: Any additional supporting documentation
changed the title [-]Web - The amount of money is displayed inaccurately[/-][+][$500] Web - The amount of money is displayed inaccurately[/+]on Sep 12, 2023
Bug Reporter: thuyle04 $50 - can you please add your full name to your GH profile (so we can find you in the future), and also apply for the job? Thanks!
Activity
ahmedGaber93 commentedon Sep 12, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The amount of money is displayed inaccurately
What is the root cause of that problem?
This because in merchant we display the
roundedDistancebut when calculating the amount we use Distance not rounding.App/src/libs/DistanceRequestUtils.js
Line 76 in 4abaeba
App/src/libs/DistanceRequestUtils.js
Lines 92 to 95 in 4abaeba
What changes do you think we should make in order to solve the problem?
We need to use
roundedDistanceingetDistanceRequestAmountWhat alternative solutions did you explore? (Optional)
N/A
DylanDylann commentedon Sep 12, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The amount of money is displayed inaccurately
What is the root cause of that problem?
In merchant field we are rounding the distance with 2 digits after the decimal point
App/src/libs/DistanceRequestUtils.js
Line 76 in 5a153a3
But when calculating the amount field we are using the correct distance
App/src/libs/DistanceRequestUtils.js
Lines 92 to 95 in 5a153a3
What changes do you think we should make in order to solve the problem?
We also should round distance before calculating the amount field like this
Result
What alternative solutions did you explore? (Optional)
We will not round the distance in both places (merchant field and calculating amount field)
With this approach we should remove toFixed(2) here
App/src/libs/DistanceRequestUtils.js
Line 76 in 5a153a3
melvin-bot commentedon Sep 12, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01789ec3d1fe468e8b
[-]Web - The amount of money is displayed inaccurately[/-][+][$500] Web - The amount of money is displayed inaccurately[/+]melvin-bot commentedon Sep 12, 2023
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 12, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 12, 2023
Triggered auto assignment to @sakluger (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Sep 12, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)26 remaining items
jliexpensify commentedon Sep 25, 2023
Payment Summary:
Bug Reporter: thuyle04 $50 - can you please add your full name to your GH profile (so we can find you in the future), and also apply for the job? Thanks!
Contributor: @ahmedGaber93 $500 + $250 (speed bonus)
C+: @mananjadhav $500 + $250 (speed bonus) - request on New.Dot
Upwork job
jliexpensify commentedon Sep 25, 2023
Bump for @mananjadhav to also complete the checklist, thanks!
jliexpensify commentedon Sep 27, 2023
Bump on checklist @mananjadhav - payments occurring tomorrow!
jliexpensify commentedon Sep 28, 2023
Bump @mananjadhav to complete the checklist
Julesssss commentedon Oct 2, 2023
Hey @mananjadhav, please complete the checklist here, or let us know if you are unavailable.
refactor: clean up util functions
mananjadhav commentedon Oct 2, 2023
This was caused by this commit and in this PR. I think we were shipping fast on the Distance request feature and hence this got missed out.
I don't think we need a regression test here.
jliexpensify commentedon Oct 3, 2023
Whoops sorry, I was OOO:
jliexpensify commentedon Oct 3, 2023
Paid Thuy, job closed - thanks!
JmillsExpensify commentedon Oct 5, 2023
$750 payment approved for @mananjadhav based on BZ summary.