From d8f81955ba1c59f925d1df5b935b2f247d5410fa Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sun, 4 Sep 2016 22:56:00 +0200 Subject: [PATCH] Changed order overview columns to increase usefulness --- src/pretix/base/services/stats.py | 3 ++- .../control/templates/pretixcontrol/orders/overview.html | 2 +- src/pretix/plugins/reports/exporters.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pretix/base/services/stats.py b/src/pretix/base/services/stats.py index 6e26a8a9c..e1442df7d 100644 --- a/src/pretix/base/services/stats.py +++ b/src/pretix/base/services/stats.py @@ -36,7 +36,8 @@ def order_overview(event: Event) -> Tuple[List[Tuple[ItemCategory, List[Item]]], num_total = { (p['item'], p['variation']): (p['cnt'], p['price']) for p in (OrderPosition.objects - .filter(order__event=event) + .filter(order__event=event, + order__status__in=[Order.STATUS_PENDING, Order.STATUS_EXPIRED, Order.STATUS_PAID]) .values('item', 'variation') .annotate(cnt=Count('id'), price=Sum('price')).order_by()) } diff --git a/src/pretix/control/templates/pretixcontrol/orders/overview.html b/src/pretix/control/templates/pretixcontrol/orders/overview.html index 4dc6422d8..7af095e7f 100644 --- a/src/pretix/control/templates/pretixcontrol/orders/overview.html +++ b/src/pretix/control/templates/pretixcontrol/orders/overview.html @@ -17,7 +17,7 @@ {% trans "Product" %} - {% trans "Total orders" %} + {% trans "Total (pending or paid)" %} {% trans "Payment pending" %} {% trans "Cancelled" %} {% trans "Refunded" %} diff --git a/src/pretix/plugins/reports/exporters.py b/src/pretix/plugins/reports/exporters.py index c92ffae68..a2adcca41 100644 --- a/src/pretix/plugins/reports/exporters.py +++ b/src/pretix/plugins/reports/exporters.py @@ -149,7 +149,7 @@ class OverviewReport(Report): ] tdata = [ [ - _('Product'), _('Total orders'), '', _('Pending'), '', _('Cancelled'), '', _('Refunded'), '', + _('Product'), _('Total (pending or paid)'), '', _('Pending'), '', _('Cancelled'), '', _('Refunded'), '', _('Paid'), '' ], [