Self-service cancellation: Never suggest cancellation fee higher than order total

This commit is contained in:
Raphael Michel
2021-08-16 14:43:08 +02:00
parent e191988b81
commit 53e3619140
2 changed files with 5 additions and 1 deletions

View File

@@ -541,7 +541,7 @@ class Order(LockModel, LoggedModel):
fee += self.event.settings.cancel_allow_user_paid_keep_percentage / Decimal('100.0') * (self.total - fee)
if self.event.settings.cancel_allow_user_paid_keep:
fee += self.event.settings.cancel_allow_user_paid_keep
return round_decimal(fee, self.event.currency)
return round_decimal(min(fee, self.total), self.event.currency)
@property
@scopes_disabled()