msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

Total doesn't display the correct value #4918

Open marthakeezy opened 2 months ago

marthakeezy commented 2 months ago

What went wrong? 😲

Numbers don't show properly in different cases, depending on what numbers get entered

Screenshot 2024-09-30 at 5 32 36 PM Screenshot 2024-09-30 at 5 38 12 PM

Expected behaviour 🤔

They should show normally without the three dots at the end :)

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Go to Dispensary -> Prescriptions
  2. Create a new Prescription or edit an existing one
  3. Add an item -> under Pack Qty, try and add decimal numbers
  4. Save the changes -> see inconsistent number display

Your environment 🌱

marthakeezy commented 2 months ago
Screenshot 2024-10-01 at 10 23 41 AM

The numbers also don't show fully once added to the prescription & picked/verified

roxy-dao commented 2 months ago

The eclipses is there to indicate that there are trailing numbers. If you hover over the numbers the tooltip should show 0.647777777777 or whatever the number is. See #4365 and similar issues.

For total, should display the correct value.

lache-melvin commented 2 months ago

For triage clarity - this issue is not about actually repeating decimals, but for numbers like Maria has, total should be 4.4. But our hasMoreThanTwoDp calculation (to determine whether to show the ...) ends up with 4.40000000000006, hence the ellipsis.

I think this should be resolved...

marthakeezy commented 2 months ago

Thanks Roxy & Laché - just a note it's impossible to hover over on a tablet, and holding my finger on the cell doesn't work either, so there actually isn't a way to see the rest of decimals on the tablet anyway

Looking at the first screenshot, the total value should be 4.4 with nothing trailing behind

roxy-dao commented 2 months ago

Also check if outbound totals and placeholder values are correct while doing this issue as well.

marthakeezy commented 4 days ago

Hey team, noticed this again in V2.4.0-RC4 when viewing Inbound Shipments

Screenshot 2024-11-28 at 5 06 05 PM