From 75e1442fceb1074dea8665c484235f30045c49f8 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 14 Jan 2021 17:48:16 +1100 Subject: [PATCH] Display overdue purchase orders on the index page --- InvenTree/templates/InvenTree/index.html | 10 ++++++++++ InvenTree/templates/InvenTree/po_overdue.html | 15 +++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 InvenTree/templates/InvenTree/po_overdue.html diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index 1b9a492a22..36e4f8bc49 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -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" %} diff --git a/InvenTree/templates/InvenTree/po_overdue.html b/InvenTree/templates/InvenTree/po_overdue.html new file mode 100644 index 0000000000..99e3e7d40f --- /dev/null +++ b/InvenTree/templates/InvenTree/po_overdue.html @@ -0,0 +1,15 @@ +{% extends "collapse_index.html" %} + +{% load i18n %} + +{% block collapse_title %} + +{% trans "Overdue Purchase Orders" %} +{% endblock %} + +{% block collapse_content %} + + +
+ +{% endblock %} \ No newline at end of file