From a2bb55757040eebe963291e5f9fc106147e86dde Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Sun, 13 Jul 2025 12:44:09 +0000 Subject: [PATCH 1/2] feat: Add non-negative constraint to workstation cost fields --- .../manufacturing/doctype/workstation/workstation.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/workstation/workstation.json b/erpnext/manufacturing/doctype/workstation/workstation.json index 34aa7f0f915..651c4e1739f 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.json +++ b/erpnext/manufacturing/doctype/workstation/workstation.json @@ -74,6 +74,7 @@ "fieldname": "hour_rate_electricity", "fieldtype": "Currency", "label": "Electricity Cost", + "non_negative": 1, "oldfieldname": "hour_rate_electricity", "oldfieldtype": "Currency" }, @@ -83,6 +84,7 @@ "fieldname": "hour_rate_consumable", "fieldtype": "Currency", "label": "Consumable Cost", + "non_negative": 1, "oldfieldname": "hour_rate_consumable", "oldfieldtype": "Currency" }, @@ -96,6 +98,7 @@ "fieldname": "hour_rate_rent", "fieldtype": "Currency", "label": "Rent Cost", + "non_negative": 1, "oldfieldname": "hour_rate_rent", "oldfieldtype": "Currency" }, @@ -105,6 +108,7 @@ "fieldname": "hour_rate_labour", "fieldtype": "Currency", "label": "Wages", + "non_negative": 1, "oldfieldname": "hour_rate_labour", "oldfieldtype": "Currency" }, @@ -254,7 +258,7 @@ "idx": 1, "image_field": "on_status_image", "links": [], - "modified": "2024-09-26 13:41:12.279344", + "modified": "2025-07-13 14:34:49.637231", "modified_by": "Administrator", "module": "Manufacturing", "name": "Workstation", @@ -274,9 +278,10 @@ } ], "quick_entry": 1, + "row_format": "Dynamic", "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "ASC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From 92a12d7feac2c3fc537ff97e7cbc99027876c83a Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Sun, 13 Jul 2025 13:03:01 +0000 Subject: [PATCH 2/2] fix: Add non-negative constraint to job capacity field in workstation --- erpnext/manufacturing/doctype/workstation/workstation.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/workstation/workstation.json b/erpnext/manufacturing/doctype/workstation/workstation.json index 651c4e1739f..bf31d7ddc39 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.json +++ b/erpnext/manufacturing/doctype/workstation/workstation.json @@ -144,6 +144,7 @@ "fieldname": "production_capacity", "fieldtype": "Int", "label": "Job Capacity", + "non_negative": 1, "reqd": 1 }, { @@ -258,7 +259,7 @@ "idx": 1, "image_field": "on_status_image", "links": [], - "modified": "2025-07-13 14:34:49.637231", + "modified": "2025-07-13 16:02:13.615001", "modified_by": "Administrator", "module": "Manufacturing", "name": "Workstation",