mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Improved button layout for purchase order page
This commit is contained in:
parent
3dddb10f5d
commit
fe4bc15c8e
@ -61,12 +61,12 @@ InvenTree | {{ order }}
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class='btn-group' style='float: right;'>
|
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
|
||||||
<button type='button' class='btn btn-primary' id='edit-order'>Edit Order</button>
|
<button type='button' class='btn btn-primary' id='edit-order'>Edit Order</button>
|
||||||
{% if order.status == OrderStatus.PENDING and order.lines.count > 0 %}
|
{% if order.status == OrderStatus.PENDING and order.lines.count > 0 %}
|
||||||
<button type='button' class='btn btn-primary' id='place-order'>Place Order</button>
|
<button type='button' class='btn btn-primary' id='place-order'>Place Order</button>
|
||||||
{% elif order.status == OrderStatus.PLACED %}
|
{% elif order.status == OrderStatus.PLACED %}
|
||||||
<button type='button' class='btn btn-primary' id='receive-order'>Receive Order</button>
|
<button type='button' class='btn btn-primary' id='receive-order'>Receive Items</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button type='button' class='btn btn-primary' id='export-order' title='Export order to file'>Export</button>
|
<button type='button' class='btn btn-primary' id='export-order' title='Export order to file'>Export</button>
|
||||||
</div>
|
</div>
|
||||||
@ -77,7 +77,7 @@ InvenTree | {{ order }}
|
|||||||
<button type='button' class='btn btn-default' id='new-po-line'>Add Line Item</button>
|
<button type='button' class='btn btn-default' id='new-po-line'>Add Line Item</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed' id='po-lines-table'>
|
<table class='table table-striped table-condensed' id='po-lines-table' data-toolbar='#order-toolbar-buttons'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortable='true'>Line</th>
|
<th data-sortable='true'>Line</th>
|
||||||
|
@ -158,7 +158,11 @@ class PurchaseOrderExport(AjaxView):
|
|||||||
|
|
||||||
export_format = request.GET.get('format', 'csv')
|
export_format = request.GET.get('format', 'csv')
|
||||||
|
|
||||||
filename = str(order) + '.' + export_format
|
filename = '{order} - {company}.{fmt}'.format(
|
||||||
|
order=str(order),
|
||||||
|
company=order.supplier.name,
|
||||||
|
fmt=export_format
|
||||||
|
)
|
||||||
|
|
||||||
filedata = order.export_to_file(format=export_format)
|
filedata = order.export_to_file(format=export_format)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user