Changeset - 5c7cf9cd2a84
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-08-18 18:20:16
brettcsmith@brettcsmith.org
balance_sheet: Sort trial balance accounts.

They were previously sorted by date, then name, which is slightly less
helpful.
2 files changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/balance_sheet.py
Show inline comments
...
 
@@ -191,10 +191,12 @@ class Balances:
 

	
 
    def iter_accounts(self, root: str) -> Iterable[data.Account]:
 
    def iter_accounts(self, root: str) -> Sequence[data.Account]:
 
        start_date = self.period_range.start
 
        stop_date = self.period_range.stop
 
        for account in data.Account.iter_accounts(root):
 
            meta = account.meta
 
            if (meta.open_date < stop_date
 
                and (meta.close_date is None or meta.close_date > start_date)):
 
                yield account
 
        return sorted(
 
            account
 
            for account in data.Account.iter_accounts(root)
 
            if account.meta.open_date < stop_date
 
            and (account.meta.close_date is None
 
                 or account.meta.close_date > start_date)
 
        )
 

	
setup.py
Show inline comments
...
 
@@ -7,3 +7,3 @@ setup(
 
    description="Plugin, library, and reports for reading Conservancy's books",
 
    version='1.8.2',
 
    version='1.8.3',
 
    author='Software Freedom Conservancy',
0 comments (0 inline, 0 general)