bornhack-website/src/backoffice/templates/ticket_stats_detail.html

48 lines
1.9 KiB
HTML
Raw Normal View History

2021-07-21 19:29:55 +00:00
{% extends 'base.html' %}
{% load commonmark %}
{% load static %}
{% load bornhack %}
{% block content %}
<div class="panel panel-default">
<div class="panel-heading">
<span class="h3">BackOffice - {{ camp.title }} {{ product_list.0.ticket_type.name }} Ticket Product Stats</span>
</div>
<div class="panel-body">
<p class="lead">This view shows a table of each product associated with the ticket type <b>{{ product_list.0.ticket_type.name }}</b> along with the number sold, cost, price, profit and margin for each product.</p>
<table class="table table-hover datatable">
<thead>
<tr>
<th>Product</th>
<th class="text-right">Revenue</th>
<th class="text-right">Cost</th>
<th class="text-right">Profit</th>
<th class="text-center">Orders</th>
<th class="text-center">Units Sold</th>
<th class="text-right">Total Revenue</th>
<th class="text-right">Total Cost</th>
<th class="text-right">Total Profit</th>
2021-07-21 19:29:55 +00:00
</tr>
</thead>
<tbody>
{% for p in product_list %}
<tr>
<td>{{ p.name }}</td>
<td class="text-right">{{ p.price|floatformat:"2" }}&nbsp;DKK</td>
<td class="text-right">{{ p.cost|floatformat:"2" }}&nbsp;DKK</td>
<td class="text-right">{{ p.profit|floatformat:"2" }}&nbsp;DKK</td>
2021-07-22 06:06:43 +00:00
<td class="text-center">{{ p.paid_order_count }}</td>
<td class="text-center">{{ p.total_units_sold }}</td>
<td class="text-right">{{ p.total_revenue|floatformat:"2" }}&nbsp;DKK</td>
<td class="text-right">{{ p.total_cost|floatformat:"2" }}&nbsp;DKK</td>
<td class="text-right">{{ p.total_profit|floatformat:"2" }}&nbsp;DKK</td>
2021-07-21 19:29:55 +00:00
</tr>
{% endfor %}
</tbody>
</table>
2021-07-21 19:32:46 +00:00
<a class="btn btn-default" href="{% url 'backoffice:shop_ticket_stats' camp_slug=camp.slug %}"><i class="fas fa-undo"></i> Back to Ticket Types</a>
2021-07-21 19:29:55 +00:00
</p>
</div>
</div>
{% endblock content %}