From 5fe40ac0856d07903d1fbbe291c668435d07a77b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 22:59:17 +0530 Subject: [PATCH] fix(work order): resolve type error during job card creation (backport #39713) (#39714) fix(work order): resolve type error during job card creation (#39713) fix: type error (cherry picked from commit c81d597ca510706cf3ca7230f21b1630e7515bf5) Co-authored-by: Vishnu VS --- erpnext/manufacturing/doctype/work_order/work_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 78bfc767d6f..02a1d27432c 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1511,14 +1511,14 @@ def get_serial_nos_for_work_order(work_order, production_item): def validate_operation_data(row): - if row.get("qty") <= 0: + if flt(row.get("qty")) <= 0: frappe.throw( _("Quantity to Manufacture can not be zero for the operation {0}").format( frappe.bold(row.get("operation")) ) ) - if row.get("qty") > row.get("pending_qty"): + if flt(row.get("qty")) > flt(row.get("pending_qty")): frappe.throw( _("For operation {0}: Quantity ({1}) can not be greter than pending quantity({2})").format( frappe.bold(row.get("operation")),