diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 3f439cec05aaa64ad97fc33f76ecefd27972b0a8..f0f864fffef7034f2119536cb7d2132aa24077f2 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -644,7 +644,6 @@ class BatchNoValuation(DeprecatedBatchNoValuation): parent = frappe.qb.DocType("Serial and Batch Bundle") child = frappe.qb.DocType("Serial and Batch Entry") - sle = frappe.qb.DocType("Stock Ledger Entry") timestamp_condition = "" if self.sle.posting_date: @@ -677,14 +676,6 @@ class BatchNoValuation(DeprecatedBatchNoValuation): & (parent.docstatus == 1) & (parent.is_cancelled == 0) & (parent.type_of_transaction.isin(["Inward", "Outward"])) - & ( - ExistsCriterion( - frappe.qb.from_(sle) - .select(sle.name) - .where((parent.name == sle.serial_and_batch_bundle) & (sle.is_cancelled == 0)) - ) - | (parent.voucher_type == "POS Invoice") - ) ) .groupby(child.batch_no) )