fix: material transfer status should be before WIP
diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py
index 5f492d7..960d0e5 100644
--- a/erpnext/manufacturing/doctype/job_card/job_card.py
+++ b/erpnext/manufacturing/doctype/job_card/job_card.py
@@ -500,6 +500,9 @@
2: "Cancelled"
}[self.docstatus or 0]
+ if self.for_quantity <= self.transferred_qty:
+ self.status = 'Material Transferred'
+
if self.time_logs:
self.status = 'Work In Progress'
@@ -507,10 +510,6 @@
(self.for_quantity <= self.total_completed_qty or not self.items)):
self.status = 'Completed'
- if self.status != 'Completed':
- if self.for_quantity <= self.transferred_qty:
- self.status = 'Material Transferred'
-
if update_status:
self.db_set('status', self.status)