mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 20:35:09 +00:00
adjust currency as needed
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user