From 75323fda0119e568da4b16c91b312b084a0d9ef5 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 6 Oct 2025 18:53:33 +0530 Subject: [PATCH] fix: do not consider draft bundles (cherry picked from commit a60f7eaf3a33ce988f1d7967d874ac98213ed7b7) --- erpnext/stock/serial_batch_bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index d4defccc452..08cacfe3bb2 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -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: