mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
tweak new function get_currency
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user