Skip to content

Commit

Permalink
fix: hide "Return of Components" button in closed SCO (backport #32130)…
Browse files Browse the repository at this point in the history
… (#32131)

fix: hide "Return of Components" button in closed SCO (#32130)

(cherry picked from commit 3585daa)

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
  • Loading branch information
mergify[bot] and s-aga-r authored Sep 8, 2022
1 parent f2ab220 commit 7840fed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ frappe.ui.form.on('Subcontracting Order', {
get_materials_from_supplier: function (frm) {
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 => {
if (d.total_supplied_qty > 0 && d.total_supplied_qty != d.consumed_qty) {
sco_rm_details.push(d.name);
Expand Down

0 comments on commit 7840fed

Please sign in to comment.