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.
This commit is contained in:
Brett Smith 2020-04-07 15:31:58 -04:00
parent dd19e2a7a6
commit 3dfe266945
2 changed files with 4 additions and 4 deletions

View file

@ -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'):

View file

@ -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