mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-22 10:56:30 +00:00
fix: condition for use_batchwise_valuation
(cherry picked from commit cc171d9706)
This commit is contained in:
committed by
Mergify
parent
6dee592ba7
commit
0ff7465e27
@@ -160,7 +160,9 @@ class Batch(Document):
|
|||||||
from erpnext.stock.utils import get_valuation_method
|
from erpnext.stock.utils import get_valuation_method
|
||||||
|
|
||||||
if self.is_new():
|
if self.is_new():
|
||||||
if frappe.db.get_single_value("Stock Settings", "do_not_use_batchwise_valuation"):
|
if get_valuation_method(self.item) == "Moving Average" and frappe.db.get_single_value(
|
||||||
|
"Stock Settings", "do_not_use_batchwise_valuation"
|
||||||
|
):
|
||||||
self.use_batchwise_valuation = 0
|
self.use_batchwise_valuation = 0
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user