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 >
2021-07-21 21:14:48 +00:00
< th class = "text-center" > Orders< / th >
< th class = "text-center" > Units Sold< / th >
2021-07-21 19:29:55 +00:00
< th class = "text-right" > Revenue< / th >
< th class = "text-right" > Cost< / th >
< th class = "text-right" > Profit< / th >
< th class = "text-right" > Margin< / th >
< / tr >
< / thead >
< tbody >
{% for p in product_list %}
< tr >
< td > {{ p.name }}< / td >
2021-07-21 21:14:48 +00:00
< td class = "text-center" > {{ p.order_set.count }}< / td >
< td class = "text-center" > {{ p.total_units_sold }}< / td >
2021-07-21 19:29:55 +00:00
< 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.profit|floatformat:"2" }} DKK< / td >
2021-07-21 19:36:50 +00:00
< td class = "text-right" > {{ p.margin|floatformat:"2" }}%< / 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 %}