Changeset - 8ec3a12d5af7
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-10-21 20:15:58
brettcsmith@brettcsmith.org
accrual: Key on entity for Liabilities:Payable:Vacation.

The invoice metadata is less operative in this account.
2 files changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/accrual.py
Show inline comments
...
 
@@ -173,17 +173,16 @@ class AccrualPostings(core.RelatedPostings):
 
    def make_consistent(cls,
 
                        postings: Iterable[data.Posting],
 
    ) -> Iterator[Tuple[Hashable, 'AccrualPostings']]:
 
        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'))
 
            if norm_func(post.units.number) >= 0:
 
                key = (post.meta.date.isoformat(), entity, invoice, post.account)
 
                accruals[key].append(post)
setup.py
Show inline comments
...
 
@@ -2,13 +2,13 @@
 

	
 
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+',
 

	
 
    install_requires=[
 
        'babel>=2.6',  # Debian:python3-babel
0 comments (0 inline, 0 general)