Skip to content
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

Distance - Zero missing after decimal in distance #58511

Open
2 of 8 tasks
lanitochka17 opened this issue Mar 14, 2025 · 2 comments
Open
2 of 8 tasks

Distance - Zero missing after decimal in distance #58511

lanitochka17 opened this issue Mar 14, 2025 · 2 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Overdue

Comments

@lanitochka17
Copy link

lanitochka17 commented Mar 14, 2025

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.1.13-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Open a workspace chat
  3. Create a distance expense so that distance with decimals 0. (34621.10/mi) Or use below attached distance way points

Expected Result:

In expense preview,reports,receipt & in details page distance must be displayed in a consistent way

Actual Result:

In expense preview,reports&receipt, distance is displayed as 34621.1/mi but in expense details page distance shown as 34621.10/mi.

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6770665_1741960786412.Screenrecorder-2025-03-14-19-19-48-104.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Mar 14, 2025
Copy link

melvin-bot bot commented Mar 14, 2025

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@daledah
Copy link
Contributor

daledah commented Mar 14, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-03-14 17:08:37 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

In expense preview,reports&receipt, distance is displayed as 34621.1/mi but in expense details page distance shown as 34621.10/mi.

What is the root cause of that problem?

We are setting MIN_TAX_RATE_DECIMAL_PLACES as 2

App/src/CONST.ts

Line 6269 in 6c03f35

MIN_TAX_RATE_DECIMAL_PLACES: 2,

And somewhere we use convertAmountToDisplayString to get the display rate name and somewhere we don't

What changes do you think we should make in order to solve the problem?

We can wrap this return in convertAmountToDisplayString

return `${currencySymbol}${formattedRate} / ${useShortFormUnit ? unit : singularDistanceUnit}`;

    return `${convertAmountToDisplayString(rate, currency)} / ${useShortFormUnit ? unit : singularDistanceUnit}`;

And we also need to BE update merchant field in transaction Onyx

Image

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

We can consider setting MIN_TAX_RATE_DECIMAL_PLACES to 1

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@melvin-bot melvin-bot bot added the Overdue label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Overdue
Projects
None yet
Development

No branches or pull requests

3 participants