Backend order detail page: Show pending sum

This commit is contained in:
Raphael Michel
2020-12-19 16:25:20 +01:00
parent 6afb954b93
commit 0e9951f964
2 changed files with 22 additions and 0 deletions

View File

@@ -570,6 +570,26 @@
</div>
<div class="clearfix"></div>
</div>
{% if order.status != "c" and order.total != payment_refund_sum %}
<div class="row-fluid product-row cart-row">
<div class="col-md-4 col-xs-6">
{% trans "Successful payments" %}
</div>
<div class="col-md-3 col-xs-6 col-md-offset-5 price">
{{ payment_refund_sum|money:event.currency }}
</div>
<div class="clearfix"></div>
</div>
<div class="row-fluid product-row total text-danger">
<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>{{ order.pending_sum|money:event.currency }}</strong>
</div>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
</div>
{% eventsignal event "pretix.control.signals.order_info" order=order request=request %}

View File

@@ -265,6 +265,8 @@ class OrderDetail(OrderView):
ctx['overpaid'] = self.order.pending_sum * -1
ctx['sales_channel'] = get_all_sales_channels().get(self.order.sales_channel)
ctx['download_buttons'] = self.download_buttons
ctx['payment_refund_sum'] = self.order.payment_refund_sum
ctx['pending_sum'] = self.order.pending_sum
return ctx
@cached_property