fix(UX): hide RM table(Job Card) if material transfer is against work order (#28746)
This commit is contained in:
parent
db46257a3b
commit
cc8c0595e2
@ -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.doc.items || !frm.doc.items.length || frm.doc.for_quantity == frm.doc.transferred_qty)) {
|
||||||
frm.trigger("prepare_timer_buttons");
|
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) {
|
setup_corrective_job_card: function(frm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user