109 lines
4.0 KiB
HTML

{% extends 'dashboard.html' %}
{% load static %}
{% block head_title %}Order No. {{ order.pk }} | {% endblock %}
{% block content %}
<article>
<p>
<a href="{% url 'dashboard:wholesale-order-list' %}">&larr; Back to wholesale</a>
</p>
<header class="object-header">
<h1><img src="{% static 'images/pallet.png' %}"> Wholesale Order No. {{order.pk}}</h1>
{% if perms.core.cancel_order and not order.is_cancelled %}
<a class="btn btn-warning" href="{% url 'dashboard:wholesale-order-cancel' order.pk %}">Cancel order</a>
{% endif %}
</header>
<section class="panel">
<header class="panel-header">
<h4>Details</h4>
</header>
<dl class="panel-datalist">
<dt>Date</dt>
<dd>{{ order.created_at }}</dd>
<dt>Customer</dt>
<dd>
<a href="{% url 'dashboard:customer-detail' order.customer.pk %}">{{order.customer.get_full_name}}</a>&emsp;
<a href="mailto:{{order.customer.email}}">{{order.customer.email}} &nearr;</a>
</dd>
<dt>Status</dt>
<dd>
{% if order.is_fulfilled %}
<span class="status status-success">Fulfilled</span>
{% elif order.is_cancelled %}
Cancelled
{% else %}
<span class="status status-error">Unfulfilled</span>
{% endif %}
</dd>
</dl>
</section>
<section class="panel">
<header class="panel-header">
<h4>Items</h4>
<a href="{% url 'dashboard:wholesale-order-fulfill' order.pk %}" class="btn">Fulfill order &rarr;</a>
</header>
<table>
<tdead>
<tr>
<th>Product</th>
<th>16 oz.</th>
<th>5 lb.</th>
</tr>
</tdead>
<tbody>
<tr>
<td>Brazil</td>
{% for qty in order.brazil %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr>
<tr>
<td>Dante's Tornado</td>
{% for qty in order.dantes_tornado %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Decaf</td>
{% for qty in order.decaf %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Ethiopia</td>
{% for qty in order.ethiopia %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Loop d' Loop</td>
{% for qty in order.loop_d_loop %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Moka Java</td>
{% for qty in order.moka_java %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Nicaragua</td>
{% for qty in order.nicaragua %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Pantomime</td>
{% for qty in order.pantomime %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr><tr>
<td>Sumatra</td>
{% for qty in order.sumatra %}
<td>{% if qty %}Qty: {{ qty }}{% endif %}</td>
{% endfor %}
</tr>
</tbody>
</table>
</section>
</article>
{% endblock content %}