mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Refactor the purchase-order table
- Filter by order status
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
{% if order.status == OrderStatus.PENDING %}
|
||||
<span class='label label-large label-info'>
|
||||
{% elif order.status == OrderStatus.PLACED %}
|
||||
<span class='label label-large label-primary'>
|
||||
{% elif order.status == OrderStatus.COMPLETE %}
|
||||
<span class='label label-large label-success'>
|
||||
{% elif order.status == OrderStatus.CANCELLED or order.status == OrderStatus.RETURNED %}
|
||||
<span class='label label-large label-warning'>
|
||||
{% else %}
|
||||
<span class='label label-large label-danger'>
|
||||
{% endif %}
|
||||
{{ order.get_status_display }}
|
||||
</span>
|
@ -1,22 +0,0 @@
|
||||
<table class='table table-striped table-condensed po-table' id='po-table' {% if toolbar %}data-toolbar='{{ toolbar }}'{% endif %}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field='company' data-sortable='true' data-searchable='true'>Company</th>
|
||||
<th data-field='reference' data-sortable='true' data-searchable='true'>Order Reference</th>
|
||||
<th data-field='description' data-sortable='true' data-searchable='true'>Description</th>
|
||||
<th data-field='status' data-sortable='true'>Status</th>
|
||||
<th data-field='items' data-sortable='true'>Items</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for order in orders %}
|
||||
<tr>
|
||||
<td>{% include "hover_image.html" with image=order.supplier.image hover=True %}<a href="{{ order.supplier.get_absolute_url }}purchase-orders/">{{ order.supplier.name }}</a></td>
|
||||
<td><a href="{% url 'po-detail' order.id %}">{{ order }}</a></td>
|
||||
<td>{{ order.description }}</td>
|
||||
<td>{% include "order/order_status.html" %}</td>
|
||||
<td>{{ order.lines.count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
@ -13,8 +13,11 @@ InvenTree | Purchase Orders
|
||||
<hr>
|
||||
|
||||
<div id='table-buttons'>
|
||||
<div class='btn-group' style='float: right;'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
<button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button>
|
||||
<div class='filter-list' id='filter-list-order'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user