def load_cash_balances(self):
from gnucash_portfolio.accounts import AccountsAggregate, AccountAggregate<EOL>cfg = self.__get_config()<EOL>cash_root_name = cfg.get(ConfigKeys.cash_root)<EOL>gc_db = self.config.get(ConfigKeys.gnucash_book_path)<EOL>with open_book(gc_db, open_if_lock=True) as book:<EOL><INDENT>svc = AccountsAggregate(book)<EOL>root_account = svc.get_by_fullname(cash_root_name)<EOL>acct_svc = AccountAggregate(book, root_account)<EOL>cash_balances = acct_svc.load_cash_balances_with_children(cash_root_name)<EOL><DEDENT>self.__store_cash_balances_per_currency(cash_balances)<EOL>
Loads cash balances from GnuCash book and recalculates into the default currency