Changeset - ea79200131e4
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2021-01-19 19:23:06
brettcsmith@brettcsmith.org
ledger: Report accounts that are not open but have postings.
1 file changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/ledger.py
Show inline comments
...
 
@@ -446,18 +446,20 @@ class LedgerODS(core.BaseODS[data.Posting, None]):
 
        for sheet_index, account in core.sort_and_filter_accounts(
 
                tally_by_account, sheet_names,
 
        ):
 
            if not account.is_open_on_date(self.date_range.start):
 
                continue
 
            while using_sheet_index < sheet_index:
 
                using_sheet_index += 1
 
                self.start_sheet(sheet_names[using_sheet_index])
 
            self.norm_func = core.normalize_amount_func(account)
 
            postings = self.account_groups[account]
 
            if postings:
 
            # Accounts that aren't open can still have postings because of
 
            # malformed input or rewrite rules.
 
            if not (postings or account.is_open_on_date(self.date_range.start)):
 
                continue
 
            elif postings:
 
                totals_set = self.totals_with_entries
 
            else:
 
                totals_set = self.totals_without_entries
 
            want_totals = account.is_under(*totals_set) is not None
 
            self.norm_func = core.normalize_amount_func(account)
 
            if postings or want_totals:
 
                self.write_header(account)
 
            if want_totals:
0 comments (0 inline, 0 general)