65 lines
2.4 KiB
HTML
65 lines
2.4 KiB
HTML
{% extends 'profile_base.html' %}
|
|
{% load bootstrap3 %}
|
|
{% load shop_tags %}
|
|
{% load bornhack %}
|
|
|
|
{% block profile_content %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4>Orders</h4>
|
|
</div>
|
|
<div class="panel-body">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Order ID</th>
|
|
<th>Items</th>
|
|
<th>Total amount</th>
|
|
<th>Open?</th>
|
|
<th>Paid?</th>
|
|
<th>Delivered?</th>
|
|
<th>Invoice</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for order in orders %}
|
|
{% if order.products.exists %}
|
|
<tr {% if not order.open and order.paid and order.is_fully_ticket_generated %}style="color: lightgrey"{% endif %}>
|
|
<td>{{ order.id }}</td>
|
|
<td>{{ order.get_number_of_items }}</td>
|
|
<td>{{ order.total|currency }}</td>
|
|
<td class="text-center">{{ order.open|truefalseicon }}</td>
|
|
<td class="text-center">{{ order.paid|truefalseicon }}</td>
|
|
<td class="text-center">{{ order.ticket_generated_status }}</td>
|
|
<td>
|
|
{% if order.paid %}
|
|
{% if order.invoice.pdf %}
|
|
{% url 'shop:download_invoice' pk=order.pk as invoice_download_url %}
|
|
{% bootstrap_button "Invoice" icon="save-file" href=invoice_download_url button_class="btn-primary btn-xs" %}
|
|
{% else %}
|
|
Not generated yet!
|
|
{% endif %}
|
|
{% else %}
|
|
{% if order.pdf %}
|
|
{% url 'shop:download_invoice' pk=order.pk as invoice_download_url %}
|
|
{% bootstrap_button "Proforma Invoice" icon="save-file" href=invoice_download_url button_class="btn-primary btn-xs" %}
|
|
{% else %}
|
|
Not generated yet!
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% url 'shop:order_detail' pk=order.pk as order_detail_url %}
|
|
{% bootstrap_button "Order details" icon="th-list" href=order_detail_url button_class="btn-primary btn-xs" %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|