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:
parent
dd19e2a7a6
commit
3dfe266945
2 changed files with 4 additions and 4 deletions
|
@ -23,7 +23,7 @@ from ..beancount_types import (
|
||||||
)
|
)
|
||||||
|
|
||||||
class MetaPayableDocumentation(core._RequireLinksPostingMetadataHook):
|
class MetaPayableDocumentation(core._RequireLinksPostingMetadataHook):
|
||||||
CHECKED_METADATA = ['invoice', 'contract']
|
CHECKED_METADATA = ['approval', 'contract']
|
||||||
|
|
||||||
def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:
|
def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:
|
||||||
if post.account.is_under('Liabilities:Payable'):
|
if post.account.is_under('Liabilities:Payable'):
|
||||||
|
|
|
@ -29,20 +29,20 @@ ACCOUNTS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
SUPPORTING_METADATA = [
|
SUPPORTING_METADATA = [
|
||||||
|
'approval',
|
||||||
'contract',
|
'contract',
|
||||||
'invoice',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
NON_SUPPORTING_METADATA = [
|
NON_SUPPORTING_METADATA = [
|
||||||
'approval',
|
|
||||||
'check',
|
'check',
|
||||||
|
'invoice',
|
||||||
'purchase-order',
|
'purchase-order',
|
||||||
'receipt',
|
'receipt',
|
||||||
'statement',
|
'statement',
|
||||||
]
|
]
|
||||||
|
|
||||||
OTHER_ACCT = 'Expenses:Other'
|
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
|
# for supporting links, use the lists from testutil
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue