mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add HTML templates for PO
This commit is contained in:
parent
76698ec627
commit
e841b7faf6
@ -171,6 +171,12 @@ src="{% static 'img/blank_image.png' %}"
|
||||
<td>{{ order.responsible }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<td><span class='fas fa-dollar-sign'></span></td>
|
||||
<td>{% trans "Total cost" %}</td>
|
||||
<td id="poTotalPrice">{{ order.get_total_price }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -43,6 +43,29 @@
|
||||
<table class='table table-striped table-condensed' id='po-line-table' data-toolbar='#order-toolbar-buttons'>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class='panel-heading'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
<h4>{% trans "Additional Order Items" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
{% if roles.purchase_order.change and order.is_pending %}
|
||||
<button type='button' class='btn btn-success' id='new-po-additional-line'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add Additional Order Items" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<div id='order-additional-toolbar-buttons' class='btn-group' style='float: right;'>
|
||||
<div class='btn-group'>
|
||||
{% include "filter_list.html" with id="purchase-order-additional-lines" %}
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-striped table-condensed' id='po-additional-lines-table' data-toolbar='#order-additional-toolbar-buttons'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='panel panel-hidden' id='panel-received-items'>
|
||||
@ -207,6 +230,37 @@ loadPurchaseOrderLineItemTable('#po-line-table', {
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
$("#new-po-additional-line").click(function() {
|
||||
|
||||
var fields = poAdditionalLineItemFields({
|
||||
order: {{ order.pk }},
|
||||
});
|
||||
|
||||
constructForm('{% url "api-po-additional-line-list" %}', {
|
||||
fields: fields,
|
||||
method: 'POST',
|
||||
title: '{% trans "Add Order Line" %}',
|
||||
onSuccess: function() {
|
||||
$("#po-additional-lines-table").bootstrapTable("refresh");
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
loadPurchaseOrderAdditionalLineItemTable(
|
||||
'#po-additional-lines-table',
|
||||
{
|
||||
order: {{ order.pk }},
|
||||
status: {{ order.status }},
|
||||
}
|
||||
);
|
||||
|
||||
loadOrderTotal(
|
||||
'#poTotalPrice',
|
||||
{
|
||||
url: '{% url "api-po-detail" order.pk %}',
|
||||
}
|
||||
);
|
||||
|
||||
enableSidebar('purchaseorder');
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user