From f63b866de301bf405c8df6d96f7c6760e239ee97 Mon Sep 17 00:00:00 2001 From: vishnu Date: Tue, 23 May 2023 04:27:50 +0000 Subject: [PATCH] fix: use flt instead of mandatory field (cherry picked from commit 8c34cc0e00980d1968e4daee07a88fd85a0b4a52) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.json --- erpnext/manufacturing/doctype/job_card/job_card.json | 7 +++++-- erpnext/manufacturing/doctype/job_card/job_card.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index aceb73893fe8..3d2467b113c8 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -117,8 +117,7 @@ "fieldname": "for_quantity", "fieldtype": "Float", "in_list_view": 1, - "label": "Qty To Manufacture", - "reqd": 1 + "label": "Qty To Manufacture" }, { "fieldname": "wip_warehouse", @@ -421,11 +420,15 @@ ], "is_submittable": 1, "links": [], +<<<<<<< HEAD <<<<<<< HEAD "modified": "2021-11-12 10:15:06.572401", ======= "modified": "2023-05-22 23:26:57.589331", >>>>>>> a209fb4b64 (fix: error while saving job card) +======= + "modified": "2023-05-23 09:56:43.826602", +>>>>>>> 8c34cc0e00 (fix: use flt instead of mandatory field) "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 092ad1ffe83f..f9ffc3529dc5 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -657,7 +657,7 @@ def set_status(self, update_status=False): 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: