fix(py3): Explicitly convert to float for comparison
This commit is contained in:
parent
a9f20d801d
commit
d9ce732d3e
@ -1124,10 +1124,10 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
||||
else:
|
||||
child_item = frappe.get_doc(parent_doctype + ' Item', d.get("docname"))
|
||||
|
||||
if parent_doctype == "Sales Order" and flt(d.get("qty")) < child_item.delivered_qty:
|
||||
if parent_doctype == "Sales Order" and flt(d.get("qty")) < flt(child_item.delivered_qty):
|
||||
frappe.throw(_("Cannot set quantity less than delivered quantity"))
|
||||
|
||||
if parent_doctype == "Purchase Order" and flt(d.get("qty")) < child_item.received_qty:
|
||||
if parent_doctype == "Purchase Order" and flt(d.get("qty")) < flt(child_item.received_qty):
|
||||
frappe.throw(_("Cannot set quantity less than received quantity"))
|
||||
|
||||
child_item.qty = flt(d.get("qty"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user