From 8ec3a12d5af734edd0352877188c44c2b1121aff 2020-10-21 20:15:58 From: Brett Smith Date: 2020-10-21 20:15:58 Subject: [PATCH] accrual: Key on entity for Liabilities:Payable:Vacation. The invoice metadata is less operative in this account. --- diff --git a/conservancy_beancount/reports/accrual.py b/conservancy_beancount/reports/accrual.py index 2dcc9c4fa1929eb17aa35a9f7915133a6f455c33..37a24a7677275f821de9629b297800eb7f32c96d 100644 --- a/conservancy_beancount/reports/accrual.py +++ b/conservancy_beancount/reports/accrual.py @@ -176,11 +176,10 @@ class AccrualPostings(core.RelatedPostings): accruals: Dict[Tuple[str, ...], List[data.Posting]] = collections.defaultdict(list) payments: Dict[Tuple[str, ...], Deque[data.Posting]] = collections.defaultdict(Deque) key: Tuple[str, ...] - prepaid_account = AccrualAccount.PREPAID.value.name for post in postings: norm_func = core.normalize_amount_func(post.account) entity = str(post.meta.get('entity', 'BlankEntity')) - if post.account.is_under(prepaid_account): + if post.account.is_under('Assets:Prepaid', 'Liabilities:Payable:Vacation'): invoice = entity else: invoice = str(post.meta.get('invoice', 'BlankInvoice')) diff --git a/setup.py b/setup.py index fc59804154c142be3905940e47d10a37d7338785..401168ce410285b1a69bccedd4f2e1afc706a6d0 100755 --- a/setup.py +++ b/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.12.4', + version='1.12.5', author='Software Freedom Conservancy', author_email='info@sfconservancy.org', license='GNU AGPLv3+',