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.
This commit is contained in:
parent
581046f988
commit
ba8aaaa988
4 changed files with 25 additions and 2 deletions
|
@ -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,
|
||||
|
|
2
setup.py
2
setup.py
|
@ -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+',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue