mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
(cherry picked from commit 0724a148e6)
Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -1157,7 +1157,7 @@ def _round_off_if_near_zero(number: float, precision: int = 6) -> float:
|
|||||||
""" Rounds off the number to zero only if number is close to zero for decimal
|
""" Rounds off the number to zero only if number is close to zero for decimal
|
||||||
specified in precision. Precision defaults to 6.
|
specified in precision. Precision defaults to 6.
|
||||||
"""
|
"""
|
||||||
if flt(number) < (1.0 / (10**precision)):
|
if abs(0.0 - flt(number)) < (1.0 / (10**precision)):
|
||||||
return 0
|
return 0.0
|
||||||
|
|
||||||
return flt(number)
|
return flt(number)
|
||||||
|
|||||||
Reference in New Issue
Block a user