fix: use completion qty instead of transfer quantity for JC status

This commit is contained in:
Ankush Menat 2021-11-03 16:33:28 +05:30 committed by Ankush Menat
parent 6907ad8adb
commit 37799fe3dd

View File

@ -504,13 +504,11 @@ class JobCard(Document):
self.status = 'Work In Progress' self.status = 'Work In Progress'
if (self.docstatus == 1 and if (self.docstatus == 1 and
(self.for_quantity <= self.transferred_qty or not self.items)): (self.for_quantity <= self.total_completed_qty or not self.items)):
# consider excess transfer
# completed qty is checked via separate validation
self.status = 'Completed' self.status = 'Completed'
if self.status != 'Completed': if self.status != 'Completed':
if self.for_quantity == self.transferred_qty: if self.for_quantity <= self.transferred_qty:
self.status = 'Material Transferred' self.status = 'Material Transferred'
if update_status: if update_status: