diff --git a/src/backoffice/templates/ticket_stats_detail.html b/src/backoffice/templates/ticket_stats_detail.html index 06d3680a..44d3329b 100644 --- a/src/backoffice/templates/ticket_stats_detail.html +++ b/src/backoffice/templates/ticket_stats_detail.html @@ -31,7 +31,7 @@ {{ p.price|floatformat:"2" }} DKK {{ p.cost|floatformat:"2" }} DKK {{ p.profit|floatformat:"2" }} DKK - {{ p.order_count }} + {{ p.paid_order_count }} {{ p.total_units_sold }} {{ p.total_revenue|floatformat:"2" }} DKK {{ p.total_cost|floatformat:"2" }} DKK diff --git a/src/shop/models.py b/src/shop/models.py index 4bedcf5b..f9580ee4 100644 --- a/src/shop/models.py +++ b/src/shop/models.py @@ -403,7 +403,7 @@ class ProductStatsManager(models.Manager): .annotate(total_revenue=F("price") * F("total_units_sold")) .annotate(total_cost=F("cost") * F("total_units_sold")) .annotate(total_profit=F("profit") * F("total_units_sold")) - .annotate(order_count=Count("orderproductrelation__order")) + .annotate(paid_order_count=Count("orderproductrelation__order")) )