Changeset - ba8aaaa98831
[Not reviewed]
0 4 0
Brett Smith - 4 years ago 2020-06-09 18:52:55
brettcsmith@brettcsmith.org
accrual: Aging report uses group since last nonzero. RT#11600.

This makes it consistent with our other reports. The fact that it wasn't
already was basically an oversight.
4 files changed with 25 insertions and 2 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/accrual.py
Show inline comments
...
 
@@ -480,7 +480,11 @@ class AgingReport(BaseReport):
 
        self.ods = AgingODS(rt_client, date, self.logger)
 

	
 
    def run(self, groups: PostGroups) -> None:
 
        rows = list(group for group in groups.values() if not group.is_zero())
 
        rows = list(
 
            group.since_last_nonzero()
 
            for group in groups.values()
 
            if not group.is_zero()
 
        )
 
        rows.sort(key=lambda related: (
 
            related.account,
 
            related[0].meta.date,
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.1.4',
 
    version='1.1.5',
 
    author='Software Freedom Conservancy',
 
    author_email='info@sfconservancy.org',
 
    license='GNU AGPLv3+',
tests/books/accruals.beancount
Show inline comments
...
 
@@ -24,6 +24,18 @@
 
  Liabilities:Payable:Accounts  125 USD
 
  Assets:Checking  -125 USD
 

	
 
2010-03-15 * "GrantCo" "2010Q1 grant"
 
  rt-id: "rt:470"
 
  invoice: "rt:470/4700"
 
  Assets:Receivable:Accounts  5000 USD
 
  Income:Donations           -5000 USD
 

	
 
2010-03-25 * "GrantCo" "2010Q1 grant ACH payment"
 
  rt-id: "rt:470"
 
  invoice: "rt:470/4700"
 
  Assets:Receivable:Accounts  -5000 USD
 
  Assets:Checking              5000 USD
 

	
 
2010-03-30 * "EarlyBird" "Travel reimbursement"
 
  rt-id: "rt:490"
 
  invoice: "rt:490/4900"
...
 
@@ -115,3 +127,9 @@
 
  contract: "rt:520/5220"
 
  Liabilities:Payable:Accounts  -1,000 EUR {1.100 USD}
 
  Expenses:FilingFees  1,000 EUR {1.100 USD}
 

	
 
2010-06-15 * "GrantCo" "2010Q2 grant"
 
  rt-id: "rt:470"
 
  invoice: "rt:470/4700"
 
  Assets:Receivable:Accounts  5500 USD
 
  Income:Donations           -5500 USD
tests/test_reports_accrual.py
Show inline comments
...
 
@@ -118,6 +118,7 @@ AGING_AR = [
 
    AgingRow.make_simple('2010-03-05', 'EarlyBird', -500, 'rt:40/400'),
 
    AgingRow.make_simple('2010-05-15', 'MatchingProgram', 1500,
 
                         'rt://ticket/515/attachments/5150'),
 
    AgingRow.make_simple('2010-06-15', 'GrantCo', 5500, 'rt:470/4700'),
 
]
 

	
 
class RTClient(testutil.RTClient):
0 comments (0 inline, 0 general)