fix: stock entry decimal issue (backport #36530) (#36533)

fix: stock entry decimal issue (#36530)

(cherry picked from commit 28dfc88789)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2023-08-07 19:11:19 +05:30
committed by GitHub
parent d76c2c5738
commit 5b04708164

View File

@@ -228,7 +228,8 @@ class MaterialRequest(BuyingController):
d.ordered_qty = flt(mr_items_ordered_qty.get(d.name)) d.ordered_qty = flt(mr_items_ordered_qty.get(d.name))
if mr_qty_allowance: if mr_qty_allowance:
allowed_qty = d.qty + (d.qty * (mr_qty_allowance / 100)) allowed_qty = flt((d.qty + (d.qty * (mr_qty_allowance / 100))), d.precision("ordered_qty"))
if d.ordered_qty and d.ordered_qty > allowed_qty: if d.ordered_qty and d.ordered_qty > allowed_qty:
frappe.throw( frappe.throw(
_( _(