Skip to content

Commit

Permalink
fix(work order): resolve type error during job card creation (backport
Browse files Browse the repository at this point in the history
…#39713) (#39714)

fix(work order): resolve type error during job card creation (#39713)

fix: type error
(cherry picked from commit c81d597)

Co-authored-by: Vishnu  VS <Vishnuviswambaran2002@gmail.com>
  • Loading branch information
mergify[bot] and Vishnu7025 authored Feb 4, 2024
1 parent 4ee8cf3 commit 5fe40ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/manufacturing/doctype/work_order/work_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down

0 comments on commit 5fe40ac

Please sign in to comment.