From 2d7fde024d859a90bb17868b06fde17c2890ab57 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 27 Oct 2025 16:57:00 +0530 Subject: [PATCH] chore: fix conflicts --- erpnext/stock/serial_batch_bundle.py | 35 ++++++++++------------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 37d539026e9..7365d388fd0 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -748,24 +748,6 @@ class BatchNoValuation(DeprecatedBatchNoValuation): parent = frappe.qb.DocType("Serial and Batch Bundle") child = frappe.qb.DocType("Serial and Batch Entry") -<<<<<<< HEAD - timestamp_condition = "" - if self.sle.posting_date: - if self.sle.posting_time is None: - self.sle.posting_time = nowtime() - - timestamp_condition = CombineDatetime(parent.posting_date, parent.posting_time) < CombineDatetime( - self.sle.posting_date, self.sle.posting_time - ) - - if self.sle.creation: - timestamp_condition |= ( - CombineDatetime(parent.posting_date, parent.posting_time) - == CombineDatetime(self.sle.posting_date, self.sle.posting_time) - ) & (parent.creation < self.sle.creation) - -======= ->>>>>>> 9c21567309 (fix: optimized the slow query to get the batchwise available qty) query = ( frappe.qb.from_(parent) .inner_join(child) @@ -805,13 +787,20 @@ class BatchNoValuation(DeprecatedBatchNoValuation): child = frappe.qb.DocType("Serial and Batch Entry") timestamp_condition = "" - if self.sle.posting_datetime: - timestamp_condition = parent.posting_datetime < self.sle.posting_datetime + if self.sle.posting_date: + if self.sle.posting_time is None: + self.sle.posting_time = nowtime() + + timestamp_condition = CombineDatetime(parent.posting_date, parent.posting_time) < CombineDatetime( + self.sle.posting_date, self.sle.posting_time + ) if self.sle.creation: - timestamp_condition |= (parent.posting_datetime == self.sle.posting_datetime) & ( - parent.creation < self.sle.creation - ) + timestamp_condition |= ( + CombineDatetime(parent.posting_date, parent.posting_time) + == CombineDatetime(self.sle.posting_date, self.sle.posting_time) + ) & (parent.creation < self.sle.creation) + query = ( frappe.qb.from_(parent)