Skip to content

Commit

Permalink
fix: use flt instead of mandatory field
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishnu7025 committed May 23, 2023
1 parent a209fb4 commit 8c34cc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions erpnext/manufacturing/doctype/job_card/job_card.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion erpnext/manufacturing/doctype/job_card/job_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,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:
Expand Down

0 comments on commit 8c34cc0

Please sign in to comment.