2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Create a new purchase order from a company page

This commit is contained in:
Oliver Walters
2019-06-10 22:56:34 +10:00
parent c132f275f5
commit 04a9b1a980
5 changed files with 41 additions and 4 deletions

View File

@ -6,11 +6,32 @@
<h4>Open Purchase Orders</h4>
<div class='container' style='float: right;'>
<div class='btn-group'>
<button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button>
</div>
</div>
{% include "order/po_table.html" with orders=company.outstanding_purchase_orders.all %}
{% if company.closed_purchase_orders.count > 0 %}
{% include "order/po_table_collapse.html" with title="Closed Orders" orders=company.closed_purchase_orders.all %}
{% endif %}
{% endblock %}
{% block js_ready %}
{{ block.super }}
$("#po-create").click(function() {
launchModalForm("{% url 'purchase-order-create' %}",
{
data: {
supplier: {{ company.id }},
},
follow: true,
}
);
});
{% endblock %}