Consistently include other fees in percentual payment fee

This commit is contained in:
Raphael Michel
2019-07-04 09:30:55 +02:00
parent ce79769293
commit a5e2caf438
3 changed files with 20 additions and 17 deletions

View File

@@ -938,6 +938,11 @@ def update_tax_rates(event: Event, cart_id: str, invoice_address: InvoiceAddress
def get_fees(event, request, total, invoice_address, provider):
fees = []
for recv, resp in fee_calculation_for_cart.send(sender=event, request=request, invoice_address=invoice_address,
total=total):
fees += resp
total = total + sum(f.value for f in fees)
if provider and total != 0:
provider = event.get_payment_providers().get(provider)
if provider:
@@ -963,10 +968,6 @@ def get_fees(event, request, total, invoice_address, provider):
tax_rule=payment_fee_tax_rule
))
for recv, resp in fee_calculation_for_cart.send(sender=event, request=request, invoice_address=invoice_address,
total=total):
fees += resp
return fees