Display overdue purchase orders on the index page

This commit is contained in:
Oliver Walters 2021-01-14 17:48:16 +11:00
parent e8fd597f29
commit 75e1442fce
2 changed files with 25 additions and 0 deletions

View File

@ -35,6 +35,7 @@ InvenTree | {% trans "Index" %}
{% if roles.purchase_order.view %}
{% include "InvenTree/po_outstanding.html" with collapse_id="po_outstanding" %}
{% endif %}
{% include "InvenTree/po_overdue.html" with collapse_id="po_overdue" %}
{% if roles.sales_order.view %}
{% include "InvenTree/so_outstanding.html" with collapse_id="so_outstanding" %}
{% include "InvenTree/so_overdue.html" with collapse_id="so_overdue" %}
@ -130,6 +131,14 @@ loadPurchaseOrderTable("#po-outstanding-table", {
}
});
loadPurchaseOrderTable("#po-overdue-table", {
url: "{% url 'api-po-list' %}",
params: {
supplier_detail: true,
overdue: true,
}
});
loadSalesOrderTable("#so-outstanding-table", {
url: "{% url 'api-so-list' %}",
params: {
@ -158,6 +167,7 @@ loadSalesOrderTable("#so-overdue-table", {
{% include "InvenTree/index/on_load.html" with label="stock-to-build" %}
{% include "InvenTree/index/on_load.html" with label="po-outstanding" %}
{% include "InvenTree/index/on_load.html" with label="po-overdue" %}
{% include "InvenTree/index/on_load.html" with label="so-outstanding" %}
{% include "InvenTree/index/on_load.html" with label="so-overdue" %}

View File

@ -0,0 +1,15 @@
{% extends "collapse_index.html" %}
{% load i18n %}
{% block collapse_title %}
<span class='fas fa-calendar-times icon-header'></span>
{% trans "Overdue Purchase Orders" %}<span class='badge' id='po-overdue-count'><span class='fas fa-spin fa-spinner'></span></span>
{% endblock %}
{% block collapse_content %}
<table class='table table-striped table-condensed' id='po-overdue-table'>
</table>
{% endblock %}