Merge pull request #45382 from rohitwaghchaure/fixed-support-29769
fix: precision issue causing incorrect status
This commit is contained in:
@@ -366,8 +366,9 @@ class WorkOrder(Document):
|
||||
if flt(self.material_transferred_for_manufacturing) > 0:
|
||||
status = "In Process"
|
||||
|
||||
total_qty = flt(flt(self.produced_qty) + flt(self.process_loss_qty), self.precision("qty"))
|
||||
if flt(total_qty) >= flt(self.qty):
|
||||
precision = frappe.get_precision("Work Order", "produced_qty")
|
||||
total_qty = flt(self.produced_qty, precision) + flt(self.process_loss_qty, precision)
|
||||
if flt(total_qty, precision) >= flt(self.qty, precision):
|
||||
status = "Completed"
|
||||
else:
|
||||
status = "Cancelled"
|
||||
|
||||
Reference in New Issue
Block a user