fix: Zero division error while fetching unconsumed materials (#27293)
`
This commit is contained in:
parent
72ece75b11
commit
9506c14d35
@ -1200,10 +1200,10 @@ class StockEntry(StockController):
|
|||||||
|
|
||||||
wo_item_qty = item.transferred_qty or item.required_qty
|
wo_item_qty = item.transferred_qty or item.required_qty
|
||||||
|
|
||||||
req_qty_each = (
|
wo_qty_consumed = flt(wo_item_qty) - flt(item.consumed_qty)
|
||||||
(flt(wo_item_qty) - flt(item.consumed_qty)) /
|
wo_qty_to_produce = flt(work_order_qty) - flt(wo.produced_qty)
|
||||||
(flt(work_order_qty) - flt(wo.produced_qty))
|
|
||||||
)
|
req_qty_each = (wo_qty_consumed) / (wo_qty_to_produce or 1)
|
||||||
|
|
||||||
qty = req_qty_each * flt(self.fg_completed_qty)
|
qty = req_qty_each * flt(self.fg_completed_qty)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user