fix(stock): ignore cancelled batch entries in valuation (backport #58659) (#58660)

fix(stock): ignore cancelled batch entries in valuation (#58659)

(cherry picked from commit a9b857bdfe)

# Conflicts:
#	erpnext/stock/serial_batch_bundle.py

Co-authored-by: Pandiyan P <pandiyanpalani37@gmail.com>
This commit is contained in:
mergify[bot]
2026-09-01 16:08:38 +00:00
committed by GitHub
parent 2b8e12ef44
commit f4ed4cae64

View File

@@ -943,6 +943,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"]))
)
.for_update()