diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index e56e374963fc145ce0b03d4551476dad1c2429d2..e322911ef3c1f9a620724d00f90a38a745e5ee1a 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -639,7 +639,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: @@ -672,14 +671,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) )