mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 12:36:37 +00:00
cint truncates, so a stock_qty of 1999.9998 (dust from qty times conversion factor) compared as abs(1999 - 2000.0) > epsilon and was rejected as fractional even though it rounds to a whole number at field precision, with the error confusingly printing the rounded value: 'Quantity (2000.0) cannot be a fraction'. Round to field precision first, then require the result to be a whole number. Dust above an integer already passed; this fixes the asymmetry for dust below.
Common utilities / DocTypes.