rename to paid_order_count
This commit is contained in:
parent
f61d0b85e8
commit
02b796e90b
|
@ -31,7 +31,7 @@
|
||||||
<td class="text-right">{{ p.price|floatformat:"2" }} DKK</td>
|
<td class="text-right">{{ p.price|floatformat:"2" }} DKK</td>
|
||||||
<td class="text-right">{{ p.cost|floatformat:"2" }} DKK</td>
|
<td class="text-right">{{ p.cost|floatformat:"2" }} DKK</td>
|
||||||
<td class="text-right">{{ p.profit|floatformat:"2" }} DKK</td>
|
<td class="text-right">{{ p.profit|floatformat:"2" }} DKK</td>
|
||||||
<td class="text-center">{{ p.order_count }}</td>
|
<td class="text-center">{{ p.paid_order_count }}</td>
|
||||||
<td class="text-center">{{ p.total_units_sold }}</td>
|
<td class="text-center">{{ p.total_units_sold }}</td>
|
||||||
<td class="text-right">{{ p.total_revenue|floatformat:"2" }} DKK</td>
|
<td class="text-right">{{ p.total_revenue|floatformat:"2" }} DKK</td>
|
||||||
<td class="text-right">{{ p.total_cost|floatformat:"2" }} DKK</td>
|
<td class="text-right">{{ p.total_cost|floatformat:"2" }} DKK</td>
|
||||||
|
|
|
@ -403,7 +403,7 @@ class ProductStatsManager(models.Manager):
|
||||||
.annotate(total_revenue=F("price") * F("total_units_sold"))
|
.annotate(total_revenue=F("price") * F("total_units_sold"))
|
||||||
.annotate(total_cost=F("cost") * F("total_units_sold"))
|
.annotate(total_cost=F("cost") * F("total_units_sold"))
|
||||||
.annotate(total_profit=F("profit") * 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"))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue