fix(UX): hide RM table(Job Card) if material transfer is against work order (#28746)

This commit is contained in:
Noah Jacob 2021-12-14 12:20:04 +05:30 committed by GitHub
parent db46257a3b
commit cc8c0595e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,15 @@ frappe.ui.form.on('Job Card', {
&& (frm.doc.items || !frm.doc.items.length || frm.doc.for_quantity == frm.doc.transferred_qty)) {
frm.trigger("prepare_timer_buttons");
}
if (frm.doc.work_order) {
frappe.db.get_value('Work Order', frm.doc.work_order,
'transfer_material_against').then((r) => {
if (r.message.transfer_material_against == 'Work Order') {
frm.set_df_property('items', 'hidden', 1);
}
});
}
},
setup_corrective_job_card: function(frm) {