fix: bom stock report not working

This commit is contained in:
Rohit Waghchaure
2021-07-05 13:54:05 +05:30
parent 73db919c99
commit 5638fbb1aa

View File

@@ -70,12 +70,12 @@ def get_bom_stock(filters):
ON bom_item.item_code = ledger.item_code ON bom_item.item_code = ledger.item_code
{conditions} {conditions}
WHERE WHERE
bom_item.parent = '{bom}' and bom_item.parenttype='BOM' bom_item.parent = {bom} and bom_item.parenttype='BOM'
GROUP BY bom_item.item_code""".format( GROUP BY bom_item.item_code""".format(
qty_field=qty_field, qty_field=qty_field,
table=table, table=table,
conditions=conditions, conditions=conditions,
bom=bom, bom=frappe.db.escape(bom),
qty_to_produce=qty_to_produce or 1) qty_to_produce=qty_to_produce or 1)
) )