adjust currency as needed

This commit is contained in:
tundebabzy
2018-01-24 02:33:30 +01:00
parent 0fb8b4b15d
commit b2b6121418

View File

@@ -129,7 +129,7 @@ def get_data(
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
company_currency = frappe.db.get_value("Company", company, "default_currency")
company_currency = get_appropriate_currency(filters, company)
gl_entries_by_account = {}
for root in frappe.db.sql("""select lft, rgt from tabAccount
@@ -155,6 +155,13 @@ def get_data(
return out
def get_appropriate_currency(filters, company):
if filters.get("presentation_currency"):
return filters["presentation_currency"]
else:
return frappe.db.get_value("Company", company, "default_currency")
def calculate_values(
accounts_by_name, gl_entries_by_account, period_list, accumulated_values, ignore_accumulated_values_for_fy):
for entries in gl_entries_by_account.values():