fix: adapt to query builder

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang
2025-11-16 22:50:58 +05:30
parent d40e660a52
commit 1cf9f903e5
49 changed files with 225 additions and 132 deletions

View File

@@ -1511,7 +1511,7 @@ def get_batchwise_qty(voucher_type, voucher_no):
batches = frappe.get_all(
"Serial and Batch Entry",
filters={"parent": ("in", bundles), "batch_no": ("is", "set")},
fields=["batch_no", "SUM(qty) as qty"],
fields=["batch_no", {"SUM": "qty", "as": "qty"}],
group_by="batch_no",
as_list=1,
)