mirror of
https://github.com/pretix/pretix.git
synced 2026-05-11 16:13:59 +00:00
Cancellation: Do not display refund notices if not required
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
{% trans "This will invalidate all of your tickets." %}
|
{% trans "This will invalidate all of your tickets." %}
|
||||||
</p>
|
</p>
|
||||||
|
{% if refund_amount %}
|
||||||
{% if can_auto_refund %}
|
{% if can_auto_refund %}
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<form method="post" action="{% eventurl request.event "presale:event.order.cancel.do" secret=order.secret order=order.code %}" data-asynctask>
|
<form method="post" action="{% eventurl request.event "presale:event.order.cancel.do" secret=order.secret order=order.code %}" data-asynctask>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ class OrderCancel(EventViewMixin, OrderDetailMixin, TemplateView):
|
|||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
ctx = super().get_context_data(**kwargs)
|
ctx = super().get_context_data(**kwargs)
|
||||||
ctx['order'] = self.order
|
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)
|
proposals = self.order.propose_auto_refunds(refund_amount)
|
||||||
ctx['refund_amount'] = refund_amount
|
ctx['refund_amount'] = refund_amount
|
||||||
ctx['can_auto_refund'] = sum(proposals.values()) == refund_amount
|
ctx['can_auto_refund'] = sum(proposals.values()) == refund_amount
|
||||||
|
|||||||
Reference in New Issue
Block a user