fix: PermissionError in Work Order
(cherry picked from commit 8108b2de0a)
This commit is contained in:
@@ -592,9 +592,8 @@ erpnext.work_order = {
|
|||||||
// all materials transferred for manufacturing, make this primary
|
// all materials transferred for manufacturing, make this primary
|
||||||
finish_btn.addClass('btn-primary');
|
finish_btn.addClass('btn-primary');
|
||||||
}
|
}
|
||||||
} else {
|
} else if (frm.doc.__onload && frm.doc.__onload.overproduction_percentage) {
|
||||||
frappe.db.get_doc("Manufacturing Settings").then((doc) => {
|
let allowance_percentage = frm.doc.__onload.overproduction_percentage;
|
||||||
let allowance_percentage = doc.overproduction_percentage_for_work_order;
|
|
||||||
|
|
||||||
if (allowance_percentage > 0) {
|
if (allowance_percentage > 0) {
|
||||||
let allowed_qty = frm.doc.qty + ((allowance_percentage / 100) * frm.doc.qty);
|
let allowed_qty = frm.doc.qty + ((allowance_percentage / 100) * frm.doc.qty);
|
||||||
@@ -605,7 +604,6 @@ erpnext.work_order = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user