mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-30 08:31:34 +00:00
62 lines
1.4 KiB
HTML
62 lines
1.4 KiB
HTML
{% extends "company/company_base.html" %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
|
|
{% block menubar %}
|
|
{% include 'company/navbar.html' with tab='po' %}
|
|
{% endblock %}
|
|
|
|
{% block heading %}
|
|
{% trans "Purchase Orders" %}
|
|
{% endblock %}
|
|
|
|
{% block details %}
|
|
|
|
{% if roles.purchase_order.add %}
|
|
<div id='button-bar'>
|
|
<div class='button-toolbar container-fluid' style='float: right;'>
|
|
<button class='btn btn-primary' type='button' id='company-order2' title='{% trans "Create new purchase order" %}'>
|
|
<span class='fas fa-plus-circle'></span> {% trans "New Purchase Order" %}</button>
|
|
<div class='filter-list' id='filter-list-purchaseorder'>
|
|
<!-- Empty div -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% 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' %}",
|
|
params: {
|
|
supplier: {{ company.id }},
|
|
}
|
|
});
|
|
|
|
|
|
function newOrder() {
|
|
launchModalForm("{% url 'po-create' %}",
|
|
{
|
|
data: {
|
|
supplier: {{ company.id }},
|
|
},
|
|
follow: true,
|
|
});
|
|
}
|
|
|
|
$("#company-order").click(function() {
|
|
newOrder();
|
|
});
|
|
|
|
$("#company-order2").click(function() {
|
|
newOrder();
|
|
});
|
|
|
|
{% endblock %}
|