Skip to content

Commit

Permalink
feat: make accounts avaiable in ledger variable (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx authored Feb 28, 2024
1 parent a16f5a7 commit 0e1b66f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fava_dashboards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ def process_panel(self, ledger, panel):
def bootstrap(self, dashboard_id):
operating_currencies = self.ledger.options["operating_currency"]
commodities = {c.currency: c for c in self.ledger.all_entries_by_type.Commodity}
accounts = self.ledger.accounts
ledger = {
"dateFirst": g.filtered._date_first,
"dateLast": g.filtered._date_last - datetime.timedelta(days=1),
"operatingCurrencies": operating_currencies,
"ccy": operating_currencies[0],
"accounts": accounts,
"commodities": commodities,
}

Expand Down

0 comments on commit 0e1b66f

Please sign in to comment.