From cdc04292f2aecd74e84e4c9465da768a2a80f293 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Thu, 11 Dec 2025 16:32:04 +0530 Subject: [PATCH] fix(manufacturing): add validation for disassemble qty (cherry picked from commit 86d6facab34d84ff5063e970467dd2ba78d82098) --- erpnext/manufacturing/doctype/work_order/work_order.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 5fe7c607b6c..9e0679a7cd1 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -403,6 +403,10 @@ frappe.ui.form.on("Work Order", { erpnext.work_order .show_prompt_for_qty_input(frm, "Disassemble") .then((data) => { + if (flt(data.qty) <= 0) { + frappe.msgprint(__("Disassemble Qty cannot be less than or equal to 0.")); + return; + } return frappe.xcall("erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry", { work_order_id: frm.doc.name, purpose: "Disassemble",