From 534627a558442c23a35be7869d499fab97cce09b 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) # Conflicts: # erpnext/manufacturing/doctype/work_order/work_order.js --- .../doctype/work_order/work_order.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index ea86d0a939c..525f389179d 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -335,6 +335,29 @@ frappe.ui.form.on("Work Order", { }); }, +<<<<<<< HEAD +======= + make_disassembly_order(frm) { + 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", + qty: data.qty, + }); + }) + .then((stock_entry) => { + frappe.model.sync(stock_entry); + frappe.set_route("Form", stock_entry.doctype, stock_entry.name); + }); + }, + +>>>>>>> 86d6facab3 (fix(manufacturing): add validation for disassemble qty) show_progress_for_items: function (frm) { var bars = []; var message = "";