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
...
 
@@ -189,14 +189,16 @@ class Balances:
 
            return prefix, -max_bal
 
        return sorted(class_bals, key=sortkey)
 

	
 
    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)
 
        )
 

	
 

	
 
class Report(core.BaseODS[Sequence[None], None]):
setup.py
Show inline comments
...
 
@@ -5,7 +5,7 @@ from setuptools import setup
 
setup(
 
    name='conservancy_beancount',
 
    description="Plugin, library, and reports for reading Conservancy's books",
 
    version='1.8.2',
 
    version='1.8.3',
 
    author='Software Freedom Conservancy',
 
    author_email='info@sfconservancy.org',
 
    license='GNU AGPLv3+',
0 comments (0 inline, 0 general)