fix(ux): make `Get Scrap Items` button hidden for submitted and cancelled doc
diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
index 95fe087..8be1c1b 100644
--- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
+++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json
@@ -286,7 +286,7 @@
"reqd": 1
},
{
- "depends_on": "supplied_items",
+ "depends_on": "eval: (!doc.__islocal && doc.docstatus == 0 && doc.supplied_items)",
"fieldname": "get_current_stock",
"fieldtype": "Button",
"label": "Get Current Stock",
@@ -629,6 +629,7 @@
"print_hide": 1
},
{
+ "depends_on": "eval: (!doc.__islocal && doc.docstatus == 0)",
"fieldname": "get_scrap_items",
"fieldtype": "Button",
"label": "Get Scrap Items",
@@ -638,7 +639,7 @@
"in_create": 1,
"is_submittable": 1,
"links": [],
- "modified": "2023-08-25 10:02:11.546559",
+ "modified": "2023-08-26 10:52:04.050829",
"modified_by": "Administrator",
"module": "Subcontracting",
"name": "Subcontracting Receipt",