From 941e924d4dfbf1e1d15d5d8edb3232a9a8b2398c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 28 Oct 2025 13:44:35 +0530 Subject: [PATCH] fix: missed refactoring code --- erpnext/stock/stock_ledger.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 9ec501a4e7f..c94b9869b11 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1932,9 +1932,6 @@ def get_valuation_rate( # Get moving average rate of a specific batch number if warehouse and serial_and_batch_bundle: - sabb = frappe.db.get_value( - "Serial and Batch Bundle", serial_and_batch_bundle, ["posting_date", "posting_time"], as_dict=True - ) batch_obj = BatchNoValuation( sle=frappe._dict( { @@ -1942,7 +1939,9 @@ def get_valuation_rate( "warehouse": warehouse, "actual_qty": -1, "serial_and_batch_bundle": serial_and_batch_bundle, - "posting_datetime": get_combine_datetime(sabb.posting_date, sabb.posting_time), + "posting_datetime": frappe.get_value( + "Serial and Batch Bundle", serial_and_batch_bundle, "posting_datetime" + ), } ) )