fix: valuation for moving average with batches

(cherry picked from commit cdfbc73f4c)
This commit is contained in:
Rohit Waghchaure
2025-03-18 14:42:40 +05:30
committed by Mergify
parent 79dacfdef8
commit 5f1bb1f1ba
5 changed files with 14 additions and 6 deletions

View File

@@ -228,7 +228,6 @@ class DeprecatedBatchNoValuation:
(sle.item_code == self.sle.item_code)
& (sle.warehouse == self.sle.warehouse)
& (sle.batch_no.isnotnull())
& (batch.use_batchwise_valuation == 0)
& (sle.is_cancelled == 0)
& (sle.batch_no.isin(self.non_batchwise_valuation_batches))
)
@@ -278,7 +277,6 @@ class DeprecatedBatchNoValuation:
(sle.item_code == self.sle.item_code)
& (sle.warehouse == self.sle.warehouse)
& (sle.batch_no.isnotnull())
& (batch.use_batchwise_valuation == 0)
& (sle.is_cancelled == 0)
)
.where(timestamp_condition)
@@ -318,7 +316,6 @@ class DeprecatedBatchNoValuation:
(sabb.item_code == self.sle.item_code)
& (sabb.warehouse == self.sle.warehouse)
& (sabb_entry.batch_no.isnotnull())
& (batch.use_batchwise_valuation == 0)
& (sabb.is_cancelled == 0)
& (sabb.docstatus == 1)
)
@@ -378,7 +375,6 @@ class DeprecatedBatchNoValuation:
(bundle.item_code == self.sle.item_code)
& (bundle.warehouse == self.sle.warehouse)
& (bundle_child.batch_no.isnotnull())
& (batch.use_batchwise_valuation == 0)
& (bundle.is_cancelled == 0)
& (bundle.docstatus == 1)
& (bundle.type_of_transaction.isin(["Inward", "Outward"]))