Merge pull request #26332 from rohitwaghchaure/fixed-bom-stock-report-not-working

fix: bom stock report not working
This commit is contained in:
rohitwaghchaure 2021-07-07 00:22:03 +05:30 committed by GitHub
commit f130f8385e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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