@@ -79,12 +79,19 @@ class MetaProject(core._NormalizePostingMetadataHook):
)
def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:
return post.account.is_under('Assets', 'Equity', 'Liabilities') is None
if post.account.is_under('Liabilities'):
return not post.account.is_credit_card()
else:
return post.account.is_under(
'Assets:Receivable',
'Expenses',
'Income',
) is not None
def _default_value(self, txn: Transaction, post: data.Posting) -> MetaValueEnum:
if post.account.is_under(
'Accrued:VacationPayable',
'Expenses:Payroll',
'Liabilities:Payable:Vacation',
):
return self.DEFAULT_PROJECT