{% extends "base.html" %}

{% load static %}

{% block page_title %}
InvenTree | Purchase Orders
{% endblock %}

{% block content %}

<h3>Purchase Orders</h3>
<hr>

<div id='table-buttons'>
    <div class='btn-group' style='float: right;'>
        <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 toolbar='#table-buttons' %}

{% endblock %}

{% block js_ready %}
{{ block.super }}

$("#po-create").click(function() {
    launchModalForm("{% url 'purchase-order-create' %}",
        {
            reload: true,
        }
    );
});

$("#po-table").bootstrapTable({
    search: true,
});

{% endblock %}