fix: material transfer status should be before WIP
This commit is contained in:
parent
4aa74af90d
commit
e1f5620654
@ -500,6 +500,9 @@ class JobCard(Document):
|
|||||||
2: "Cancelled"
|
2: "Cancelled"
|
||||||
}[self.docstatus or 0]
|
}[self.docstatus or 0]
|
||||||
|
|
||||||
|
if self.for_quantity <= self.transferred_qty:
|
||||||
|
self.status = 'Material Transferred'
|
||||||
|
|
||||||
if self.time_logs:
|
if self.time_logs:
|
||||||
self.status = 'Work In Progress'
|
self.status = 'Work In Progress'
|
||||||
|
|
||||||
@ -507,10 +510,6 @@ class JobCard(Document):
|
|||||||
(self.for_quantity <= self.total_completed_qty or not self.items)):
|
(self.for_quantity <= self.total_completed_qty or not self.items)):
|
||||||
self.status = 'Completed'
|
self.status = 'Completed'
|
||||||
|
|
||||||
if self.status != 'Completed':
|
|
||||||
if self.for_quantity <= self.transferred_qty:
|
|
||||||
self.status = 'Material Transferred'
|
|
||||||
|
|
||||||
if update_status:
|
if update_status:
|
||||||
self.db_set('status', self.status)
|
self.db_set('status', self.status)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user