mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 17:53:49 +00:00
fix(manufacturing): add validation for disassemble qty
(cherry picked from commit 86d6facab3)
This commit is contained in:
@@ -403,6 +403,10 @@ frappe.ui.form.on("Work Order", {
|
|||||||
erpnext.work_order
|
erpnext.work_order
|
||||||
.show_prompt_for_qty_input(frm, "Disassemble")
|
.show_prompt_for_qty_input(frm, "Disassemble")
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
if (flt(data.qty) <= 0) {
|
||||||
|
frappe.msgprint(__("Disassemble Qty cannot be less than or equal to <b>0</b>."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
return frappe.xcall("erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry", {
|
return frappe.xcall("erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry", {
|
||||||
work_order_id: frm.doc.name,
|
work_order_id: frm.doc.name,
|
||||||
purpose: "Disassemble",
|
purpose: "Disassemble",
|
||||||
|
|||||||
Reference in New Issue
Block a user