Pending display

This commit is contained in:
Raphael Michel
2019-09-18 19:27:32 +02:00
parent db71ec92be
commit c68f715e07
3 changed files with 22 additions and 1 deletions

View File

@@ -531,7 +531,7 @@ class PaymentStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
def post(self, request):
self.request = request
if request.POST.get("giftcard"):
if request.POST.get("giftcard") and request.POST.get("payment") == "giftcard":
# TODO: cross-organizer acceptance, …
try:
gc = GiftCard.objects.get(

View File

@@ -128,6 +128,26 @@
</div>
<div class="panel-body">
{% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event download=can_download editable=False %}
{% if order.status == "n" and order.total > pending_sum %}
<div class="row cart-row">
<div class="col-md-4 col-xs-6">
<strong>{% trans "Successful payments" %}</strong>
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
<strong>{{ payment_sum_neg|money:event.currency }}</strong>
</div>
<div class="clearfix"></div>
</div>
<div class="row cart-row total">
<div class="col-md-4 col-xs-6">
<strong>{% trans "Pending total" %}</strong>
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
<strong>{{ pending_sum|money:event.currency }}</strong>
</div>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
</div>
{% eventsignal event "pretix.presale.signals.order_info" order=order %}

View File

@@ -193,6 +193,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TicketPageMixin,
if self.order.status == Order.STATUS_PENDING:
ctx['pending_sum'] = self.order.pending_sum
ctx['payment_sum_neg'] = ctx['pending_sum'] - self.order.total
lp = self.order.payments.last()
ctx['can_pay'] = False