From 3a80e116e8b50d46d41fbaf4fae1c85e95ceb220 Mon Sep 17 00:00:00 2001 From: Vishist16 <101823906+Vishist16@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:50:41 +0530 Subject: [PATCH] fix: prevent negative values in BOM fields (#48520, #48662) (#48696) * fix: prevent negative values in BOM fields (#48520, #48662) * fix: applied non_negative validation using Desk UI for BOM fields --- .../manufacturing/doctype/bom_operation/bom_operation.json | 7 +++++-- .../doctype/bom_scrap_item/bom_scrap_item.json | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json index 02ca7b07f41..087b82d3b8b 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json @@ -76,6 +76,7 @@ "fieldname": "hour_rate", "fieldtype": "Currency", "label": "Hour Rate", + "non_negative": 1, "oldfieldname": "hour_rate", "oldfieldtype": "Currency", "options": "currency", @@ -90,6 +91,7 @@ "fieldtype": "Float", "in_list_view": 1, "label": "Operation Time", + "non_negative": 1, "oldfieldname": "time_in_mins", "oldfieldtype": "Currency", "reqd": 1 @@ -285,13 +287,14 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2025-01-09 15:45:37.695800", + "modified": "2025-07-31 16:17:47.287117", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Operation", "owner": "Administrator", "permissions": [], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.json b/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.json index 3d04a2b291b..e782a882e8b 100644 --- a/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.json +++ b/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.json @@ -42,6 +42,7 @@ "fieldtype": "Float", "in_list_view": 1, "label": "Qty", + "non_negative": 1, "reqd": 1 }, { @@ -49,6 +50,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Rate", + "non_negative": 1, "options": "currency" }, { @@ -92,15 +94,16 @@ ], "istable": 1, "links": [], - "modified": "2024-03-27 13:06:41.395036", + "modified": "2025-07-31 16:21:44.047007", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Scrap Item", "owner": "Administrator", "permissions": [], "quick_entry": 1, + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +}