mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: Work order dialog box 'Select Quantity' on clicking 'Finish' (#19136)
The dialog box fetched 0 as Quantity to Manufacture and Max Quantity on finishing a Work Order
This commit is contained in:
@@ -545,11 +545,14 @@ erpnext.work_order = {
|
|||||||
|
|
||||||
get_max_transferable_qty: (frm, purpose) => {
|
get_max_transferable_qty: (frm, purpose) => {
|
||||||
let max = 0;
|
let max = 0;
|
||||||
if (frm.doc.skip_transfer) return max;
|
if (frm.doc.skip_transfer) {
|
||||||
if (purpose === 'Manufacture') {
|
max = flt(frm.doc.qty) - flt(frm.doc.produced_qty);
|
||||||
max = flt(frm.doc.material_transferred_for_manufacturing) - flt(frm.doc.produced_qty);
|
|
||||||
} else {
|
} else {
|
||||||
max = flt(frm.doc.qty) - flt(frm.doc.material_transferred_for_manufacturing);
|
if (purpose === 'Manufacture') {
|
||||||
|
max = flt(frm.doc.material_transferred_for_manufacturing) - flt(frm.doc.produced_qty);
|
||||||
|
} else {
|
||||||
|
max = flt(frm.doc.qty) - flt(frm.doc.material_transferred_for_manufacturing);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return flt(max, precision('qty'));
|
return flt(max, precision('qty'));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user