From 4e7cccbdf08c9be6df0c63bad47797351a53c54b Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Thu, 24 Aug 2023 11:47:11 +0530 Subject: [PATCH] feat: `Is Scrap Item` field in Subcontracting Receipt Item --- .../subcontracting_receipt_item.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json index d72878061c..fc09422306 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json @@ -10,6 +10,7 @@ "item_code", "column_break_2", "item_name", + "is_scrap_item", "section_break_4", "description", "brand", @@ -345,7 +346,8 @@ "label": "BOM", "no_copy": 1, "options": "BOM", - "print_hide": 1 + "print_hide": 1, + "read_only_depends_on": "eval: doc.is_scrap_item" }, { "fetch_from": "item_code.brand", @@ -490,12 +492,22 @@ "no_copy": 1, "options": "Serial and Batch Bundle", "print_hide": 1 + }, + { + "default": "0", + "depends_on": "eval: !doc.bom", + "fieldname": "is_scrap_item", + "fieldtype": "Check", + "label": "Is Scrap Item", + "no_copy": 1, + "print_hide": 1, + "read_only_depends_on": "eval: doc.bom" } ], "idx": 1, "istable": 1, "links": [], - "modified": "2023-07-06 18:43:45.599761", + "modified": "2023-08-24 11:52:22.666506", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Receipt Item",