fix: precision issue
This commit is contained in:
parent
57f2dce682
commit
e93dc9f1cd
@ -1193,8 +1193,9 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
||||
frappe.throw(_("Cannot set quantity less than received quantity"))
|
||||
|
||||
child_item.qty = flt(d.get("qty"))
|
||||
precision = child_item.precision("rate") or 2
|
||||
|
||||
if flt(child_item.billed_amt) > (flt(d.get("rate")) * flt(d.get("qty"))):
|
||||
if flt(child_item.billed_amt, precision) > flt(flt(d.get("rate")) * flt(d.get("qty")), precision):
|
||||
frappe.throw(_("Row #{0}: Cannot set Rate if amount is greater than billed amount for Item {1}.")
|
||||
.format(child_item.idx, child_item.item_code))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user