Generate invoice earlier in payment method change process (Z#23179304) (#4763)

* Generate invoice earlier in payment method change process (Z##23179304)

* Resolve review note
This commit is contained in:
Raphael Michel
2025-02-03 17:39:46 +01:00
committed by GitHub
parent 2a3cdd85e8
commit c820d742d4
3 changed files with 33 additions and 22 deletions

View File

@@ -267,8 +267,9 @@ def _handle_transaction(trans: BankTransaction, matches: tuple, event: Event = N
if created:
# We're perform a payment method switching on-demand here
old_fee, new_fee, fee, p = change_payment_provider(order, p.payment_provider, p.amount,
new_payment=p, create_log=False) # noqa
old_fee, new_fee, fee, p, new_invoice_created = change_payment_provider(
order, p.payment_provider, p.amount, new_payment=p, create_log=False
) # noqa
if fee:
p.fee = fee
p.save(update_fields=['fee'])