Revert "meta_receipt: Don't check chargebacks. RT#10978."
This reverts commit 6aadb740e6
.
This is supposed to be done in meta_approval, not meta_receipt.
This commit is contained in:
parent
6aadb740e6
commit
23e1ed7cee
2 changed files with 0 additions and 23 deletions
|
@ -40,7 +40,6 @@ class MetaReceipt(core._RequireLinksPostingMetadataHook):
|
||||||
(post.account.is_cash_equivalent() or post.account.is_credit_card())
|
(post.account.is_cash_equivalent() or post.account.is_credit_card())
|
||||||
and not post.account.is_under('Assets:PayPal')
|
and not post.account.is_under('Assets:PayPal')
|
||||||
and abs(post.units.number) >= self.payment_threshold
|
and abs(post.units.number) >= self.payment_threshold
|
||||||
and post.meta.get('tax-implication', '').title() != 'Chargeback'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def _run_checking_debit(self, txn: Transaction, post: data.Posting) -> errormod.Iter:
|
def _run_checking_debit(self, txn: Transaction, post: data.Posting) -> errormod.Iter:
|
||||||
|
|
|
@ -343,28 +343,6 @@ def test_fallback_on_zero_amount_postings(hook, test_acct, other_acct, value):
|
||||||
])
|
])
|
||||||
assert not list(hook.run(txn))
|
assert not list(hook.run(txn))
|
||||||
|
|
||||||
@pytest.mark.parametrize('test_acct,other_acct', testutil.combine_values(
|
|
||||||
ACCOUNTS,
|
|
||||||
NOT_REQUIRED_ACCOUNTS,
|
|
||||||
))
|
|
||||||
def test_not_required_on_chargeback_txns(hook, test_acct, other_acct):
|
|
||||||
if test_acct.required_types & PostType.DEBIT:
|
|
||||||
check(hook, test_acct, other_acct, None,
|
|
||||||
txn_meta={'tax-implication': 'Chargeback'},
|
|
||||||
check_type=PostType.DEBIT,
|
|
||||||
)
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('test_acct,other_acct', testutil.combine_values(
|
|
||||||
ACCOUNTS,
|
|
||||||
NOT_REQUIRED_ACCOUNTS,
|
|
||||||
))
|
|
||||||
def test_not_required_on_chargeback_posts(hook, test_acct, other_acct):
|
|
||||||
if test_acct.required_types & PostType.DEBIT:
|
|
||||||
check(hook, test_acct, other_acct, None,
|
|
||||||
post_meta={'tax-implication': 'Chargeback'},
|
|
||||||
check_type=PostType.DEBIT,
|
|
||||||
)
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('test_acct,equity_acct', testutil.combine_values(
|
@pytest.mark.parametrize('test_acct,equity_acct', testutil.combine_values(
|
||||||
ACCOUNTS,
|
ACCOUNTS,
|
||||||
testutil.OPENING_EQUITY_ACCOUNTS,
|
testutil.OPENING_EQUITY_ACCOUNTS,
|
||||||
|
|
Loading…
Reference in a new issue