2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 04:12:11 +00:00

Use the client-side PO table in more places

This commit is contained in:
Oliver Walters
2019-12-09 21:55:00 +11:00
parent a257f94ac0
commit 71c1faf9ff
5 changed files with 79 additions and 59 deletions

View File

@@ -13,17 +13,19 @@
</div>
</div>
{% include "order/po_table.html" with orders=company.outstanding_purchase_orders.all toolbar='#button-bar' %}
{% if company.closed_purchase_orders.count > 0 %}
{% include "order/po_table_collapse.html" with title="Closed Orders" orders=company.closed_purchase_orders.all %}
{% endif %}
<table class='table table-striped table-condensed po-table' id='purchase-order-table' data-toolbar='#button-bar'>
</table>
{% endblock %}
{% block js_ready %}
{{ block.super }}
loadPurchaseOrderTable($("#purchase-order-table"), {
url: "{% url 'api-po-list' %}?supplier={{ company.id }}",
});
function newOrder() {
launchModalForm("{% url 'purchase-order-create' %}",
{