fix: hide "Return of Components" button in closed SCO (#32130)
This commit is contained in:
parent
72d5366e96
commit
3585daab95
@ -107,7 +107,7 @@ frappe.ui.form.on('Subcontracting Order', {
|
|||||||
get_materials_from_supplier: function (frm) {
|
get_materials_from_supplier: function (frm) {
|
||||||
let sco_rm_details = [];
|
let sco_rm_details = [];
|
||||||
|
|
||||||
if (frm.doc.supplied_items && frm.doc.per_received > 0) {
|
if (frm.doc.status != "Closed" && frm.doc.supplied_items && frm.doc.per_received > 0) {
|
||||||
frm.doc.supplied_items.forEach(d => {
|
frm.doc.supplied_items.forEach(d => {
|
||||||
if (d.total_supplied_qty > 0 && d.total_supplied_qty != d.consumed_qty) {
|
if (d.total_supplied_qty > 0 && d.total_supplied_qty != d.consumed_qty) {
|
||||||
sco_rm_details.push(d.name);
|
sco_rm_details.push(d.name);
|
||||||
|
Loading…
Reference in New Issue
Block a user