[fix][report] in item prices
diff --git a/stock/report/item_prices/item_prices.py b/stock/report/item_prices/item_prices.py
index c8d0b69..3bdb746 100644
--- a/stock/report/item_prices/item_prices.py
+++ b/stock/report/item_prices/item_prices.py
@@ -100,7 +100,8 @@
val_rate_map = {}
- for d in webnotes.conn.sql("""select item_code, avg(valuation_rate) as val_rate
+ for d in webnotes.conn.sql("""select item_code,
+ sum(actual_qty*valuation_rate)/sum(actual_qty) as val_rate
from tabBin where actual_qty > 0 group by item_code""", as_dict=1):
val_rate_map.setdefault(d.item_code, d.val_rate)