Refactor purchase order page

This commit is contained in:
Oliver 2021-11-30 20:39:28 +11:00
parent 7b43e3e585
commit fd02197851
3 changed files with 33 additions and 29 deletions

View File

@ -53,15 +53,17 @@
<span class='fas fa-shopping-cart icon-blue'></span>
</button>
{% elif order.status == PurchaseOrderStatus.PLACED %}
<button type='button' class='btn btn-outline-secondary' id='receive-order' title='{% trans "Receive items" %}'>
<span class='fas fa-sign-in-alt icon-blue'></span>
<button type='button' class='btn btn-primary' id='receive-order' title='{% trans "Receive items" %}'>
<span class='fas fa-sign-in-alt'></span>
{% trans "Receive Items" %}
</button>
<button type='button' class='btn btn-outline-secondary' id='complete-order' title='{% trans "Mark order as complete" %}'>
<span class='fas fa-check-circle icon-green'></span>
<button type='button' class='btn btn-success' id='complete-order' title='{% trans "Mark order as complete" %}'>
<span class='fas fa-check-circle'></span>
{% trans "Complete Order" %}
</button>
{% endif %}
{% endif %}
{% endblock %}
{% endblock actions %}
{% block thumbnail %}
<img class='part-thumb'
@ -75,24 +77,18 @@ src="{% static 'img/blank_image.png' %}"
{% block details %}
<h4>
{% purchase_order_status_label order.status large=True %}
{% if order.is_overdue %}
<span class='badge rounded-pill bg-danger'>{% trans "Overdue" %}</span>
{% endif %}
</h4>
<p>{{ order.description }}{% include "clip.html"%}</p>
{% endblock %}
{% block details_right %}
<table class='table'>
<table class='table table-striped table-condensed'>
<col width='25'>
<tr>
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Order Reference" %}</td>
<td>{% settings_value 'PURCHASEORDER_REFERENCE_PREFIX' %}{{ order.reference }}{% include "clip.html"%}</td>
</tr>
<tr>
<td><span class='fas fa-info-circle'></span></td>
<td>{% trans "Order Description" %}</td>
<td>{{ order.description }}{% include "clip.html" %}</td>
</tr>
<tr>
<td><span class='fas fa-info'></span></td>
<td>{% trans "Order Status" %}</td>
@ -103,6 +99,14 @@ src="{% static 'img/blank_image.png' %}"
{% endif %}
</td>
</tr>
</table>
{% endblock %}
{% block details_right %}
<table class='table table-condensed table-striped'>
<col width='25'>
<tr>
<td><span class='fas fa-building'></span></td>
<td>{% trans "Supplier" %}</td>

View File

@ -27,7 +27,7 @@
<span class='fas fa-plus-circle'></span> {% trans "Add Line Item" %}
</button>
{% elif order.status == PurchaseOrderStatus.PLACED %}
<button type='button' class='btn btn-success' id='receive-selected-items' title='{% trans "Receive selected items" %}'>
<button type='button' class='btn btn-primary' id='receive-selected-items' title='{% trans "Receive selected items" %}'>
<span class='fas fa-sign-in-alt'></span> {% trans "Receive Items" %}
</button>
{% endif %}

View File

@ -68,7 +68,7 @@ src="{% static 'img/blank_image.png' %}"
</button>
{% endif %}
{% endif %}
{% endblock %}
{% endblock actions %}
{% block details %}
@ -84,6 +84,16 @@ src="{% static 'img/blank_image.png' %}"
<td>{% trans "Order Description" %}</td>
<td>{{ order.description }}{% include "clip.html" %}</td>
</tr>
<tr>
<td><span class='fas fa-info'></span></td>
<td>{% trans "Order Status" %}</td>
<td>
{% sales_order_status_label order.status %}
{% if order.is_overdue %}
<span class='badge rounded-pill bg-danger'>{% trans "Overdue" %}</span>
{% endif %}
</td>
</tr>
</table>
<div class='info-messages'>
@ -99,16 +109,6 @@ src="{% static 'img/blank_image.png' %}"
{% block details_right %}
<table class='table table-striped table-condensed'>
<col width='25'>
<tr>
<td><span class='fas fa-info'></span></td>
<td>{% trans "Order Status" %}</td>
<td>
{% sales_order_status_label order.status %}
{% if order.is_overdue %}
<span class='badge rounded-pill bg-danger'>{% trans "Overdue" %}</span>
{% endif %}
</td>
</tr>
{% if order.customer %}
<tr>
<td><span class='fas fa-building'></span></td>