From d9e9f35230cb458f359586cc37308dca3e70fa01 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 8 Dec 2025 19:46:08 +0530 Subject: [PATCH] fix: incorrect condition (cherry picked from commit 264baf34f6ccaed6f326d1a04bf484381ef67dbe) --- erpnext/stock/stock_ledger.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 3aff3d35ffa..71a7883d644 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1934,8 +1934,7 @@ def get_valuation_rate( & (table.warehouse == warehouse) & (table.batch_no == batch_no) & (table.is_cancelled == 0) - & (table.voucher_no != voucher_no) - & (table.voucher_type != voucher_type) + & ((table.voucher_no != voucher_no) | (table.voucher_type != voucher_type)) ) )