From 199071b7731d729ddb1248dace1ecda6bd6743bb Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Fri, 25 Aug 2023 09:36:12 +0530 Subject: [PATCH] fix(ux): make `Recalculate Rate` field hidden for scrap items --- .../subcontracting_receipt_item.json | 7 +++++-- 1 file changed, 5 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 1ac5bcb480..5442dfddd7 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json @@ -476,9 +476,11 @@ }, { "default": "1", + "depends_on": "eval: !doc.is_scrap_item", "fieldname": "recalculate_rate", "fieldtype": "Check", - "label": "Recalculate Rate" + "label": "Recalculate Rate", + "read_only_depends_on": "eval: doc.is_scrap_item" }, { "fieldname": "serial_and_batch_bundle", @@ -519,6 +521,7 @@ { "fieldname": "reference_name", "fieldtype": "Data", + "hidden": 1, "label": "Reference Name", "no_copy": 1, "read_only": 1 @@ -527,7 +530,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2023-08-24 21:57:15.897010", + "modified": "2023-08-25 09:33:47.232140", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Receipt Item",