fix(UX): hide RM table(Job Card) if material transfer is against work order (#28746)
diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js
index 453ad50..dac7b36 100644
--- a/erpnext/manufacturing/doctype/job_card/job_card.js
+++ b/erpnext/manufacturing/doctype/job_card/job_card.js
@@ -75,6 +75,15 @@
&& (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) {