这是indexloc提供的服务,不要输入任何密码
Skip to content

Bug Report: Decimal Precision Issue in POS Item Quantity Display #48785

@Thawshi-Srikanth

Description

@Thawshi-Srikanth

Information about bug

Image

Summary:

In the POS interface, item quantities in the item selector display excessive floating-point decimal places (e.g., 2.0700000000000003) instead of a clean, fixed number of decimals.

Steps to Reproduce:

Add or sell items measured in fractional units (e.g., Kg, Liter) in POS.
Observe the quantity displayed on the item selector card or search results.

The quantity shows with many trailing decimal digits due to floating-point precision issues.

Expected Behavior:

Quantities should be displayed rounded to a reasonable decimal precision (e.g., 3 decimals), ensuring a clean and user-friendly display such as 2.070 instead of 2.0700000000000003.

Actual Behavior:

Quantities are displayed with long floating-point tails like 2.0700000000000003 making the UI look cluttered and unprofessional.

Module

selling

Version

https://github.com/frappe/erpnext/tree/version-15

Installation method

None

Relevant log output / Stack trace / Full Error Message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions