mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-26 06:31:13 +01:00
fix: wrap none type rate under flt (#36602)
(cherry picked from commit 627986efa1)
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
This commit is contained in:
@@ -233,7 +233,7 @@ class StatusUpdater(Document):
|
|||||||
if hasattr(d, "qty") and d.qty > 0 and self.get("is_return"):
|
if hasattr(d, "qty") and d.qty > 0 and self.get("is_return"):
|
||||||
frappe.throw(_("For an item {0}, quantity must be negative number").format(d.item_code))
|
frappe.throw(_("For an item {0}, quantity must be negative number").format(d.item_code))
|
||||||
|
|
||||||
if hasattr(d, "item_code") and hasattr(d, "rate") and d.rate < 0:
|
if hasattr(d, "item_code") and hasattr(d, "rate") and flt(d.rate) < 0:
|
||||||
frappe.throw(_("For an item {0}, rate must be a positive number").format(d.item_code))
|
frappe.throw(_("For an item {0}, rate must be a positive number").format(d.item_code))
|
||||||
|
|
||||||
if d.doctype == args["source_dt"] and d.get(args["join_field"]):
|
if d.doctype == args["source_dt"] and d.get(args["join_field"]):
|
||||||
|
|||||||
Reference in New Issue
Block a user