From 89c2bbed7cf25102c1105e5e0296778a5121807a Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Fri, 8 Aug 2025 14:45:25 +0000 Subject: [PATCH] fix: Add filter to item_code query for scrap_items to exclude disabled items --- erpnext/manufacturing/doctype/job_card/job_card.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index f30d40103ed..21fec7c8afb 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -23,6 +23,14 @@ frappe.ui.form.on("Job Card", { }; }); + frm.set_query("item_code", "scrap_items", () => { + return { + filters: { + disabled: 0, + }, + }; + }); + frm.events.set_company_filters(frm, "source_warehouse"); frm.events.set_company_filters(frm, "wip_warehouse"); frm.set_query("source_warehouse", "items", () => {