[fix][report] in item prices
This commit is contained in:
parent
b7784eac36
commit
71253bea0f
@ -100,7 +100,8 @@ def get_valuation_rate():
|
|||||||
|
|
||||||
val_rate_map = {}
|
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):
|
from tabBin where actual_qty > 0 group by item_code""", as_dict=1):
|
||||||
val_rate_map.setdefault(d.item_code, d.val_rate)
|
val_rate_map.setdefault(d.item_code, d.val_rate)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user