fix: precision on work order total qty (backport #45341) (#45361)

fix: precision on work order total qty (#45341)

* fix: precision on work order total qty

* chore: linters

(cherry picked from commit 53468202de)

Co-authored-by: Dany Robert <rtdany10@gmail.com>
This commit is contained in:
mergify[bot]
2025-01-22 17:25:50 +05:30
committed by GitHub
parent be2593bb51
commit 8b6a20d501

View File

@@ -366,7 +366,7 @@ class WorkOrder(Document):
if flt(self.material_transferred_for_manufacturing) > 0:
status = "In Process"
total_qty = flt(self.produced_qty) + flt(self.process_loss_qty)
total_qty = flt(flt(self.produced_qty) + flt(self.process_loss_qty), self.precision("qty"))
if flt(total_qty) >= flt(self.qty):
status = "Completed"
else: