tweak new function get_currency

This commit is contained in:
tundebabzy
2018-01-22 17:39:18 +01:00
parent c2b6c9ba04
commit d93f2ddd4e

View File

@@ -128,16 +128,22 @@ def get_currency(filters):
:return: str - Currency :return: str - Currency
""" """
if filters.get("presentation_currency"): currency_map = {}
currency = filters["presentation_currency"] company = None
else: presentation_currency = None
if filters.get("company"): company_currency = None
currency = get_company_currency(filters["company"])
else:
company = get_default_company()
currency = get_company_currency(company)
return currency if filters.get('company'):
company = filters['company']
else:
company = get_default_company()
company_currency = get_company_currency(company)
presentation_currency = filters['presentation_currency'] if filters.get('presentation_currency') else company_currency
currency_map = dict(
company=company, company_currency=company_currency, presentation_currency=presentation_currency
)
return currency_map
def get_gl_entries(filters): def get_gl_entries(filters):