fix: do not consider draft bundles

(cherry picked from commit a60f7eaf3a)
(cherry picked from commit 75323fda01)
This commit is contained in:
Rohit Waghchaure
2025-10-06 18:53:33 +05:30
committed by Mergify
parent 161c1fb7a4
commit 92afae7185

View File

@@ -1374,7 +1374,7 @@ def throw_negative_batch_validation(batch_no, qty):
def get_batchwise_qty(voucher_type, voucher_no):
bundles = frappe.get_all(
"Serial and Batch Bundle",
filters={"voucher_no": voucher_no, "voucher_type": voucher_type},
filters={"voucher_no": voucher_no, "voucher_type": voucher_type, "docstatus": (">", 0)},
pluck="name",
)
if not bundles: