[fix] Valuation Rate in Stock Balance report

This commit is contained in:
Nabin Hait 2015-10-06 18:46:56 +05:30
parent 0bc3ca02f3
commit 8a7bdd5a92

View File

@ -93,14 +93,14 @@ def get_item_warehouse_map(filters):
qty_dict.opening_qty += qty_diff
qty_dict.opening_val += value_diff
elif d.posting_date >= getdate(filters["from_date"]) and d.posting_date <= getdate(filters["to_date"]):
qty_dict.val_rate = d.valuation_rate
if qty_diff > 0:
qty_dict.in_qty += qty_diff
qty_dict.in_val += value_diff
else:
qty_dict.out_qty += abs(qty_diff)
qty_dict.out_val += abs(value_diff)
qty_dict.val_rate = d.valuation_rate
qty_dict.bal_qty += qty_diff
qty_dict.bal_val += value_diff