fix: Cannot read properties of undefined (reading 'work_order_closed') (#44117)
(cherry picked from commit 13834014b5)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ frappe.ui.form.on("Job Card", {
|
||||
frappe.flags.resume_job = 0;
|
||||
let has_items = frm.doc.items && frm.doc.items.length;
|
||||
|
||||
if (!frm.is_new() && frm.doc.__onload.work_order_closed) {
|
||||
if (!frm.is_new() && frm.doc.__onload?.work_order_closed) {
|
||||
frm.disable_save();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user