From a9b857bdfec6732380db6078e9788f41d62391f4 Mon Sep 17 00:00:00 2001 From: Pandiyan P Date: Tue, 1 Sep 2026 21:19:51 +0530 Subject: [PATCH] fix(stock): ignore cancelled batch entries in valuation (#58659) --- erpnext/stock/serial_batch_bundle.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 1636f81b861..bed71974b87 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -947,6 +947,7 @@ class BatchNoValuation(DeprecatedBatchNoValuation): & (child.warehouse == self.sle.warehouse) & (child.batch_no.isin(self.batchwise_valuation_batches)) & (child.docstatus == 1) + & (child.is_cancelled == 0) & (child.type_of_transaction.isin(["Inward", "Outward"])) )