From d7d080fb963d371a460ea54e463e8c7c74023c2c Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 23 Jun 2021 15:30:04 +0200 Subject: [PATCH] adding in manufacturer and supplier tables --- InvenTree/part/templates/part/prices.html | 42 ++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/InvenTree/part/templates/part/prices.html b/InvenTree/part/templates/part/prices.html index ac4565b8b1..21bc8d405a 100644 --- a/InvenTree/part/templates/part/prices.html +++ b/InvenTree/part/templates/part/prices.html @@ -136,9 +136,16 @@

{% trans "Supplier Cost" %}

-
- PLACEHOLDER FOR SUPPLIER COST TABLE -
+
+
+

{% trans "Suppliers" %}

+
+
+
+

{% trans "Manufacturers" %}

+
+
+
@@ -243,6 +250,33 @@ {% block js_ready %} {{ block.super }} + + loadSupplierPartTable( + "#supplier-table", + "{% url 'api-supplier-part-list' %}", + { + params: { + part: {{ part.id }}, + part_detail: false, + supplier_detail: true, + manufacturer_detail: true, + }, + } + ); + + loadManufacturerPartTable( + "#manufacturer-table", + "{% url 'api-manufacturer-part-list' %}", + { + params: { + part: {{ part.id }}, + part_detail: false, + manufacturer_detail: true, + }, + } + ); + + // history graphs {% default_currency as currency %} {% if price_history %} @@ -405,7 +439,7 @@ }) {% endif %} - + // Load the BOM table data loadBomTable($("#bom-table"), { editable: {{ editing_enabled }},