From a209fb4b64cfc43f6bf266a6f96275226d2c2707 Mon Sep 17 00:00:00 2001 From: vishnu Date: Mon, 22 May 2023 18:00:50 +0000 Subject: [PATCH 1/2] fix: error while saving job card --- erpnext/manufacturing/doctype/job_card/job_card.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index 85061113ce..bb84b6f201 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -120,7 +120,8 @@ "fieldname": "for_quantity", "fieldtype": "Float", "in_list_view": 1, - "label": "Qty To Manufacture" + "label": "Qty To Manufacture", + "reqd": 1 }, { "fieldname": "wip_warehouse", @@ -439,7 +440,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2022-11-09 15:02:44.490731", + "modified": "2023-05-22 23:26:57.589331", "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", From 8c34cc0e00980d1968e4daee07a88fd85a0b4a52 Mon Sep 17 00:00:00 2001 From: vishnu Date: Tue, 23 May 2023 04:27:50 +0000 Subject: [PATCH 2/2] fix: use flt instead of mandatory field --- erpnext/manufacturing/doctype/job_card/job_card.json | 5 ++--- erpnext/manufacturing/doctype/job_card/job_card.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index bb84b6f201..316e586b7a 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -120,8 +120,7 @@ "fieldname": "for_quantity", "fieldtype": "Float", "in_list_view": 1, - "label": "Qty To Manufacture", - "reqd": 1 + "label": "Qty To Manufacture" }, { "fieldname": "wip_warehouse", @@ -440,7 +439,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2023-05-22 23:26:57.589331", + "modified": "2023-05-23 09:56:43.826602", "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 4a4046e47a..a7d0b29f83 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -730,7 +730,7 @@ class JobCard(Document): self.status = {0: "Open", 1: "Submitted", 2: "Cancelled"}[self.docstatus or 0] if self.docstatus < 2: - if self.for_quantity <= self.transferred_qty: + if flt(self.for_quantity) <= flt(self.transferred_qty): self.status = "Material Transferred" if self.time_logs: