forked from CGM_Public/pretix_original
Self-service cancellation: Allow to disable auto-refunds
This commit is contained in:
@@ -1440,6 +1440,7 @@ DEFAULTS = {
|
|||||||
('off', _('All refunds are issued to the original payment method')),
|
('off', _('All refunds are issued to the original payment method')),
|
||||||
('option', _('Customers can choose between a gift card and a refund to their payment method')),
|
('option', _('Customers can choose between a gift card and a refund to their payment method')),
|
||||||
('force', _('All refunds are issued as gift cards')),
|
('force', _('All refunds are issued as gift cards')),
|
||||||
|
('manually', _('Do not handle refunds automatically at all')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
'form_class': forms.ChoiceField,
|
'form_class': forms.ChoiceField,
|
||||||
@@ -1449,6 +1450,7 @@ DEFAULTS = {
|
|||||||
('off', _('All refunds are issued to the original payment method')),
|
('off', _('All refunds are issued to the original payment method')),
|
||||||
('option', _('Customers can choose between a gift card and a refund to their payment method')),
|
('option', _('Customers can choose between a gift card and a refund to their payment method')),
|
||||||
('force', _('All refunds are issued as gift cards')),
|
('force', _('All refunds are issued as gift cards')),
|
||||||
|
('manually', _('Do not handle refunds automatically at all')),
|
||||||
],
|
],
|
||||||
widget=forms.RadioSelect,
|
widget=forms.RadioSelect,
|
||||||
# When adding a new ordering, remember to also define it in the event model
|
# When adding a new ordering, remember to also define it in the event model
|
||||||
|
|||||||
@@ -397,7 +397,7 @@
|
|||||||
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
||||||
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "option" %}
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "option" %}
|
||||||
{% trans "The refund can be issued to your original payment method or as a gift card." %}
|
{% trans "The refund can be issued to your original payment method or as a gift card." %}
|
||||||
{% else %}
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard != "manually" %}
|
||||||
{% trans "The refund will be issued to your original payment method." %}
|
{% trans "The refund will be issued to your original payment method." %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% trans "This will invalidate all tickets in this order." %}
|
{% trans "This will invalidate all tickets in this order." %}
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
||||||
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "option" %}
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "option" %}
|
||||||
{% trans "The refund can be issued to your original payment method or as a gift card." %}
|
{% trans "The refund can be issued to your original payment method or as a gift card." %}
|
||||||
{% else %}
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard != "manually" %}
|
||||||
{% trans "The refund will be issued to your original payment method." %}
|
{% trans "The refund will be issued to your original payment method." %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% trans "This will invalidate all tickets in this order." %}
|
{% trans "This will invalidate all tickets in this order." %}
|
||||||
|
|||||||
@@ -84,7 +84,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if refund_amount %}
|
{% if refund_amount %}
|
||||||
{% if request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "force" %}
|
{% if request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "manually" %}
|
||||||
|
<strong>
|
||||||
|
{% trans "The organizer will get in touch with you to clarify the details of your refund." %}
|
||||||
|
</strong>
|
||||||
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "force" %}
|
||||||
<strong>
|
<strong>
|
||||||
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
||||||
</strong>
|
</strong>
|
||||||
|
|||||||
@@ -873,11 +873,14 @@ class OrderCancelDo(EventViewMixin, OrderDetailMixin, AsyncAction, View):
|
|||||||
return redirect(self.get_order_url())
|
return redirect(self.get_order_url())
|
||||||
fee = None
|
fee = None
|
||||||
require_approval = False
|
require_approval = False
|
||||||
auto_refund = not self.request.event.settings.cancel_allow_user_paid_require_approval
|
auto_refund = (
|
||||||
|
not self.request.event.settings.cancel_allow_user_paid_require_approval
|
||||||
|
and self.request.event.settings.cancel_allow_user_paid_refund_as_giftcard != "manually"
|
||||||
|
)
|
||||||
if self.order.status == Order.STATUS_PAID and self.order.total != Decimal('0.00'):
|
if self.order.status == Order.STATUS_PAID and self.order.total != Decimal('0.00'):
|
||||||
require_approval = self.request.event.settings.cancel_allow_user_paid_require_approval
|
require_approval = self.request.event.settings.cancel_allow_user_paid_require_approval
|
||||||
fee = self.order.user_cancel_fee
|
fee = self.order.user_cancel_fee
|
||||||
auto_refund = True
|
auto_refund = self.request.event.settings.cancel_allow_user_paid_refund_as_giftcard != "manually"
|
||||||
if self.order.total == Decimal('0.00'):
|
if self.order.total == Decimal('0.00'):
|
||||||
fee = Decimal('0.00')
|
fee = Decimal('0.00')
|
||||||
elif 'cancel_fee' in request.POST and self.request.event.settings.cancel_allow_user_paid_adjust_fees:
|
elif 'cancel_fee' in request.POST and self.request.event.settings.cancel_allow_user_paid_adjust_fees:
|
||||||
|
|||||||
Reference in New Issue
Block a user