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

fix: type error
This commit is contained in:
Vishnu VS 2024-02-04 12:17:18 +05:30 committed by GitHub
parent d9a72c1e61
commit c81d597ca5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 greater than pending quantity({2})").format(
frappe.bold(row.get("operation")),