{% extends "base.html" %}

{% block content %}

<h3>Supplier Order Details</h3>

<table class='table table-striped'>
<tr>
    <td>Reference</td>
    <td>{{ order.internal_ref }}</td>
</tr>
<tr>
    <td>Supplier</td>
    <td>
        {% if order.supplier %}
        <a href="{% url 'supplier-detail-orders' order.supplier.id %}">{{ order.supplier.name }}</a>
        {% endif %}
    </td>
</tr>
<tr>
    <td>Status</td>
    <td>{% include "supplier/order_status.html" with order=order %}</td>
</tr>
<tr>
    <td>Created Date</td>
    <td>{{ order.created_date }}</td>
</tr>
<tr>
    <td>Issued Date</td>
    <td>{{ order.issued_date }}</td>
</tr>
<tr>
    <td>Delivered Date</td>
    <td>{{ order.delivery_date }}</td>
</tr>
</table>


{% if order.notes %}
<div class="panel panel-default">
  <div class="panel-heading"><b>Notes</b></div>
  <div class="panel-body">{{ order.notes }}</div>
</div>
{% endif %}

<h2>TODO</h2>
Here we list all the line ites which exist under this order...

{% endblock %}