Merge pull request #47986 from frappe/mergify/bp/version-14-hotfix/pr-47942

fix: available qty in BOM Stock Report (backport #47942)
This commit is contained in:
rohitwaghchaure
2025-06-10 14:03:06 +05:30
committed by GitHub

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"))