fix: prevent negative values in BOM fields (#48520, #48662) (backport #48696) (#48897)

* 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

(cherry picked from commit 3a80e116e8)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_operation/bom_operation.json
#	erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.json

* chore: resolve conflicts

* chore: resolve conflicts

---------

Co-authored-by: Vishist16 <101823906+Vishist16@users.noreply.github.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2025-07-31 15:42:23 +00:00
committed by GitHub
parent 5291c66ea1
commit 5de5a8bfd5
2 changed files with 7 additions and 3 deletions

View File

@@ -65,6 +65,7 @@
"fieldname": "hour_rate",
"fieldtype": "Currency",
"label": "Hour Rate",
"non_negative": 1,
"oldfieldname": "hour_rate",
"oldfieldtype": "Currency",
"options": "currency",
@@ -78,6 +79,7 @@
"fieldtype": "Float",
"in_list_view": 1,
"label": "Operation Time",
"non_negative": 1,
"oldfieldname": "time_in_mins",
"oldfieldtype": "Currency",
"reqd": 1
@@ -194,7 +196,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-11-04 17:17:16.986941",
"modified": "2025-07-31 16:17:47.287117",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Operation",

View File

@@ -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,7 +94,7 @@
],
"istable": 1,
"links": [],
"modified": "2023-01-03 14:19:28.460965",
"modified": "2025-07-31 16:21:44.047007",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Scrap Item",
@@ -103,4 +105,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}