fix: check if Moving average item can use batchwise valuation

This commit is contained in:
Ankush Menat
2022-02-20 12:58:53 +05:30
committed by Ankush Menat
parent 6b0bc35063
commit f38690f703
2 changed files with 33 additions and 1 deletions

View File

@@ -261,7 +261,7 @@ def get_valuation_method(item_code):
"""get valuation method from item or default"""
val_method = frappe.db.get_value('Item', item_code, 'valuation_method', cache=True)
if not val_method:
val_method = frappe.db.get_value("Stock Settings", None, "valuation_method") or "FIFO"
val_method = frappe.db.get_value("Stock Settings", None, "valuation_method", cache=True) or "FIFO"
return val_method
def get_fifo_rate(previous_stock_queue, qty):