meta_tax_implication: Don't enforce on Assets:PrepaidExpenses.
This commit is contained in:
parent
28238643a3
commit
3f9e67de3a
2 changed files with 11 additions and 1 deletions
|
@ -47,7 +47,7 @@ class MetaTaxImplication(core._NormalizePostingMetadataHook):
|
|||
|
||||
def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:
|
||||
return bool(
|
||||
post.account.startswith('Assets:')
|
||||
post.account.is_real_asset()
|
||||
and post.units.number
|
||||
and post.units.number < DEFAULT_STOP_AMOUNT
|
||||
)
|
||||
|
|
|
@ -109,6 +109,16 @@ def test_non_asset_accounts_skipped(account):
|
|||
assert not errors
|
||||
testutil.check_post_meta(txn, None, meta)
|
||||
|
||||
def test_prepaid_expenses_skipped():
|
||||
txn = testutil.Transaction(postings=[
|
||||
('Expenses:General', 25),
|
||||
('Assets:PrepaidExpenses', -25),
|
||||
])
|
||||
checker = meta_tax_implication.MetaTaxImplication()
|
||||
errors = list(checker.run(txn))
|
||||
assert not errors
|
||||
testutil.check_post_meta(txn, None, None)
|
||||
|
||||
def test_asset_credits_skipped():
|
||||
txn = testutil.Transaction(postings=[
|
||||
('Income:Donations', -25),
|
||||
|
|
Loading…
Reference in a new issue