Changeset - 3dfe2669455b
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-04-07 19:31:58
brettcsmith@brettcsmith.org
meta_payable_documentation: Bugfix which metadata we're checking.

Checking approval/contract was in the original specification,
looking at invoice instead of approval was a pure brain fart.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/meta_payable_documentation.py
Show inline comments
...
 
@@ -23,7 +23,7 @@ from ..beancount_types import (
 
)
 

	
 
class MetaPayableDocumentation(core._RequireLinksPostingMetadataHook):
 
    CHECKED_METADATA = ['invoice', 'contract']
 
    CHECKED_METADATA = ['approval', 'contract']
 

	
 
    def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:
 
        if post.account.is_under('Liabilities:Payable'):
tests/test_meta_payable_documentation.py
Show inline comments
...
 
@@ -29,20 +29,20 @@ ACCOUNTS = [
 
]
 

	
 
SUPPORTING_METADATA = [
 
    'approval',
 
    'contract',
 
    'invoice',
 
]
 

	
 
NON_SUPPORTING_METADATA = [
 
    'approval',
 
    'check',
 
    'invoice',
 
    'purchase-order',
 
    'receipt',
 
    'statement',
 
]
 

	
 
OTHER_ACCT = 'Expenses:Other'
 
MISSING_MSG = f"{{}} missing invoice/contract".format
 
MISSING_MSG = f"{{}} missing approval/contract".format
 

	
 
# for supporting links, use the lists from testutil
 

	
0 comments (0 inline, 0 general)