fix: available qty in BOM Stock Report

(cherry picked from commit ea689bbe3f)
This commit is contained in:
Rohit Waghchaure
2025-06-06 16:14:43 +05:30
committed by Mergify
parent 52aafc9410
commit 186173a21e

View File

@@ -79,7 +79,7 @@ def get_bom_stock(filters):
BOM_ITEM.stock_qty,
BOM_ITEM.stock_uom,
BOM_ITEM.stock_qty * qty_to_produce / BOM.quantity,
Sum(BIN.actual_qty).as_("actual_qty"),
BIN.actual_qty.as_("actual_qty"),
Sum(Floor(BIN.actual_qty / (BOM_ITEM.stock_qty * qty_to_produce / BOM.quantity))),
)
.where((BOM_ITEM.parent == filters.get("bom")) & (BOM_ITEM.parenttype == "BOM"))