def get_account_currency(account):
 if (not account):
  return
 def generator():
  (account_currency, company) = frappe.db.get_value(u'Account', account, [u'account_currency', u'company'])
  if (not account_currency):
   account_currency = frappe.db.get_value(u'Company', company, u'default_currency')
  return account_currency
 return frappe.local_cache(u'account_currency', account, generator)

def get_account_currency ( account ) : if ( not account ) : return def generator ( ) : ( account_currency , company ) = frappe . db . get_value ( u'Account' , account , [ u'account_currency' , u'company' ] ) if ( not account_currency ) : account_currency = frappe . db . get_value ( u'Company' , company , u'default_currency' ) return account_currency return frappe . local_cache ( u'account_currency' , account , generator )
helper function to get account currency .