fix: material transfer status should be before WIP

This commit is contained in:
Ankush Menat 2022-03-23 14:20:28 +05:30 committed by Ankush Menat
parent 4aa74af90d
commit e1f5620654

View File

@ -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)