mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 03:17:55 +00:00
fix: inward same serial / batches in disassembly which were used
(cherry picked from commit 95e6c72539)
# Conflicts:
# erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py
# erpnext/stock/doctype/stock_entry/stock_entry.py
This commit is contained in:
committed by
Mergify
parent
3a2d7d18a3
commit
cfbd71693b
@@ -229,7 +229,8 @@ frappe.ui.form.on("Work Order", {
|
||||
if (
|
||||
frm.doc.docstatus === 1 &&
|
||||
["Closed", "Completed"].includes(frm.doc.status) &&
|
||||
frm.doc.produced_qty > 0
|
||||
frm.doc.produced_qty > 0 &&
|
||||
frm.doc.produced_qty > frm.doc.disassembled_qty
|
||||
) {
|
||||
frm.add_custom_button(
|
||||
__("Disassemble Order"),
|
||||
@@ -406,7 +407,6 @@ frappe.ui.form.on("Work Order", {
|
||||
work_order_id: frm.doc.name,
|
||||
purpose: "Disassemble",
|
||||
qty: data.qty,
|
||||
target_warehouse: data.target_warehouse,
|
||||
});
|
||||
})
|
||||
.then((stock_entry) => {
|
||||
@@ -863,24 +863,6 @@ erpnext.work_order = {
|
||||
},
|
||||
];
|
||||
|
||||
if (purpose === "Disassemble") {
|
||||
fields.push({
|
||||
fieldtype: "Link",
|
||||
options: "Warehouse",
|
||||
fieldname: "target_warehouse",
|
||||
label: __("Target Warehouse"),
|
||||
default: frm.doc.source_warehouse || frm.doc.wip_warehouse,
|
||||
get_query() {
|
||||
return {
|
||||
filters: {
|
||||
company: frm.doc.company,
|
||||
is_group: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
frm.qty_prompt = frappe.prompt(
|
||||
fields,
|
||||
|
||||
Reference in New Issue
Block a user