feat: support for serial item

(cherry picked from commit 3d0f649411)
This commit is contained in:
Mihir Kandoi
2026-01-13 12:28:56 +05:30
committed by Mergify
parent f1e41f4a4f
commit c4c2d35565
2 changed files with 13 additions and 2 deletions

View File

@@ -989,9 +989,10 @@ def get_batch_nos(serial_and_batch_bundle):
entries = frappe.get_all(
"Serial and Batch Entry",
fields=["batch_no", "qty", "name"],
fields=["batch_no", {"SUM": "qty", "as": "qty"}],
filters={"parent": serial_and_batch_bundle, "batch_no": ("is", "set")},
order_by="idx",
group_by="batch_no",
)
if not entries: