forked from CGM_Public/pretix_original
Cancellation: Do not display refund notices if not required
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
{% endblocktrans %}
|
||||
{% trans "This will invalidate all of your tickets." %}
|
||||
</p>
|
||||
{% if refund_amount %}
|
||||
{% if can_auto_refund %}
|
||||
<p>
|
||||
<strong>
|
||||
@@ -32,6 +33,7 @@
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% eventurl request.event "presale:event.order.cancel.do" secret=order.secret order=order.code %}" data-asynctask>
|
||||
{% csrf_token %}
|
||||
|
||||
@@ -583,7 +583,7 @@ class OrderCancel(EventViewMixin, OrderDetailMixin, TemplateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx['order'] = self.order
|
||||
refund_amount = self.order.total - self.order.user_cancel_fee
|
||||
refund_amount = self.order.payment_refund_sum - self.order.user_cancel_fee
|
||||
proposals = self.order.propose_auto_refunds(refund_amount)
|
||||
ctx['refund_amount'] = refund_amount
|
||||
ctx['can_auto_refund'] = sum(proposals.values()) == refund_amount
|
||||
|
||||
Reference in New Issue
Block a user