mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
Merge pull request #49425 from rohitwaghchaure/fixed-valuation-for-batch
fix: valuation for batch items
This commit is contained in:
@@ -804,12 +804,15 @@ class BatchNoValuation(DeprecatedBatchNoValuation):
|
|||||||
self.non_batchwise_valuation_batches = self.batches
|
self.non_batchwise_valuation_batches = self.batches
|
||||||
return
|
return
|
||||||
|
|
||||||
batches = frappe.get_all(
|
if get_valuation_method(self.sle.item_code) == "FIFO":
|
||||||
"Batch", filters={"name": ("in", self.batches), "use_batchwise_valuation": 1}, fields=["name"]
|
self.batchwise_valuation_batches = self.batches
|
||||||
)
|
else:
|
||||||
|
batches = frappe.get_all(
|
||||||
|
"Batch", filters={"name": ("in", self.batches), "use_batchwise_valuation": 1}, fields=["name"]
|
||||||
|
)
|
||||||
|
|
||||||
for batch in batches:
|
for batch in batches:
|
||||||
self.batchwise_valuation_batches.append(batch.name)
|
self.batchwise_valuation_batches.append(batch.name)
|
||||||
|
|
||||||
self.non_batchwise_valuation_batches = list(set(self.batches) - set(self.batchwise_valuation_batches))
|
self.non_batchwise_valuation_batches = list(set(self.batches) - set(self.batchwise_valuation_batches))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user