diff --git a/InvenTree/company/templates/company/partdetail.html b/InvenTree/company/templates/company/partdetail.html
deleted file mode 100644
index 2237f0848d..0000000000
--- a/InvenTree/company/templates/company/partdetail.html
+++ /dev/null
@@ -1,132 +0,0 @@
-{% extends "company/supplier_part_base.html" %}
-{% load static %}
-{% load i18n %}
-
-{% block page_title %}
-InvenTree | {{ company.name }} - {% trans "Parts" %}
-{% endblock %}
-
-{% block details %}
-
-{% include "company/supplier_part_tabs.html" with tab='details' %}
-
-
-
-
-
-
{% trans "Supplier Part Details" %}
-
-
- {% trans "Internal Part" %} |
-
- {% if part.part %}
- {{ part.part.full_name }}
- {% endif %}
- |
-
- {% trans "Supplier" %} | {{ part.supplier.name }} |
- {% trans "SKU" %} | {{ part.SKU }} |
- {% if part.URL %}
- {% trans "URL" %} | {{ part.URL }} |
- {% endif %}
- {% if part.description %}
- {% trans "Description" %} | {{ part.description }} |
- {% endif %}
- {% if part.manufacturer %}
- {% trans "Manufacturer" %} | {{ part.manufacturer }} |
- {% trans "MPN" %} | {{ part.MPN }} |
- {% endif %}
- {% if part.note %}
- {% trans "Note" %} | {{ part.note }} |
- {% endif %}
-
-
-
-
-
{% trans "Pricing Information" %}
-
- {% trans "Order Multiple" %} | {{ part.multiple }} |
- {% if part.base_cost > 0 %}
- {% trans "Base Price (Flat Fee)" %} | {{ part.base_cost }} |
- {% endif %}
-
- {% trans "Price Breaks" %} |
-
-
-
-
- |
-
-
- {% trans "Quantity" %} |
- {% trans "Price" %} |
-
- {% if part.price_breaks.all %}
- {% for pb in part.price_breaks.all %}
-
- {{ pb.quantity }} |
-
- {% if pb.currency %}{{ pb.currency.symbol }}{% endif %}
- {{ pb.cost }}
- {% if pb.currency %}{{ pb.currency.suffix }}{% endif %}
-
-
-
-
- |
-
- {% endfor %}
- {% else %}
-
-
- {% trans "No price breaks have been added for this part" %}
- |
-
- {% endif %}
-
-
-
-
-
-
-{% trans "Purchase Orders" %}
-{% include "order/po_table.html" with orders=part.purchase_orders %}
-
-{% endblock %}
-
-{% block js_ready %}
-{{ block.super }}
-
-
- $('#new-price-break').click(function() {
- launchModalForm("{% url 'price-break-create' %}",
- {
- reload: true,
- data: {
- part: {{ part.id }},
- }
- }
- );
- });
-
- $('.pb-edit-button').click(function() {
- var button = $(this);
-
- launchModalForm(button.attr('url'),
- {
- reload: true,
- }
- );
- });
-
- $('.pb-delete-button').click(function() {
- var button = $(this);
-
- launchModalForm(button.attr('url'),
- {
- reload: true,
- }
- );
- });
-
-{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/company/templates/company/supplier_part_detail.html b/InvenTree/company/templates/company/supplier_part_detail.html
new file mode 100644
index 0000000000..1e2b24c94b
--- /dev/null
+++ b/InvenTree/company/templates/company/supplier_part_detail.html
@@ -0,0 +1,47 @@
+{% extends "company/supplier_part_base.html" %}
+{% load static %}
+{% load i18n %}
+
+{% block details %}
+
+{% include "company/supplier_part_tabs.html" with tab='details' %}
+
+
+
+{% trans "Supplier Part Details" %}
+
+
+ {% trans "Internal Part" %} |
+
+ {% if part.part %}
+ {{ part.part.full_name }}
+ {% endif %}
+ |
+
+ {% trans "Supplier" %} | {{ part.supplier.name }} |
+ {% trans "SKU" %} | {{ part.SKU }} |
+{% if part.URL %}
+ {% trans "URL" %} | {{ part.URL }} |
+{% endif %}
+{% if part.description %}
+ {% trans "Description" %} | {{ part.description }} |
+{% endif %}
+{% if part.manufacturer %}
+ {% trans "Manufacturer" %} | {{ part.manufacturer }} |
+ {% trans "MPN" %} | {{ part.MPN }} |
+{% endif %}
+{% if part.note %}
+ {% trans "Note" %} | {{ part.note }} |
+{% endif %}
+
+
+{% trans "Purchase Orders" %}
+{% include "order/po_table.html" with orders=part.purchase_orders %}
+
+{% endblock %}
+
+{% block js_ready %}
+{{ block.super }}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/company/templates/company/supplier_part_pricing.html b/InvenTree/company/templates/company/supplier_part_pricing.html
new file mode 100644
index 0000000000..354b76db86
--- /dev/null
+++ b/InvenTree/company/templates/company/supplier_part_pricing.html
@@ -0,0 +1,91 @@
+{% extends "company/supplier_part_base.html" %}
+{% load static %}
+{% load i18n %}
+{% load inventree_extras %}
+
+{% block details %}
+
+{% include "company/supplier_part_tabs.html" with tab='pricing' %}
+
+
+{% trans "Pricing Information" %}
+
+ {% trans "Order Multiple" %} | {{ part.multiple }} |
+ {% if part.base_cost > 0 %}
+ {% trans "Base Price (Flat Fee)" %} | {{ part.base_cost }} |
+ {% endif %}
+
+ {% trans "Price Breaks" %} |
+
+
+
+
+ |
+
+
+ {% trans "Quantity" %} |
+ {% trans "Price" %} |
+
+ {% if part.price_breaks.all %}
+ {% for pb in part.price_breaks.all %}
+
+ {% decimal pb.quantity %} |
+
+ {% if pb.currency %}{{ pb.currency.symbol }}{% endif %}
+ {% decimal pb.cost %}
+ {% if pb.currency %}{{ pb.currency.suffix }}{% endif %}
+
+
+
+
+ |
+
+ {% endfor %}
+ {% else %}
+
+
+ {% trans "No price breaks have been added for this part" %}
+ |
+
+ {% endif %}
+
+
+{% endblock %}
+
+{% block js_ready %}
+{{ block.super }}
+
+
+
+$('#new-price-break').click(function() {
+ launchModalForm("{% url 'price-break-create' %}",
+ {
+ reload: true,
+ data: {
+ part: {{ part.id }},
+ }
+ }
+ );
+});
+
+$('.pb-edit-button').click(function() {
+ var button = $(this);
+
+ launchModalForm(button.attr('url'),
+ {
+ reload: true,
+ }
+ );
+});
+
+$('.pb-delete-button').click(function() {
+ var button = $(this);
+
+ launchModalForm(button.attr('url'),
+ {
+ reload: true,
+ }
+ );
+});
+
+{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/company/templates/company/supplier_part_tabs.html b/InvenTree/company/templates/company/supplier_part_tabs.html
index a7c33d22a5..d9746b6df3 100644
--- a/InvenTree/company/templates/company/supplier_part_tabs.html
+++ b/InvenTree/company/templates/company/supplier_part_tabs.html
@@ -5,7 +5,7 @@
{% trans "Details" %}
- {% trans "Pricing" %}
+ {% trans "Pricing" %}
{% trans "Stock" %}
diff --git a/InvenTree/company/urls.py b/InvenTree/company/urls.py
index a7683b7bbc..f4251f4ceb 100644
--- a/InvenTree/company/urls.py
+++ b/InvenTree/company/urls.py
@@ -47,7 +47,9 @@ price_break_urls = [
]
supplier_part_detail_urls = [
- url(r'edit/?', views.SupplierPartEdit.as_view(), name='supplier-part-edit'),
+ url(r'^edit/?', views.SupplierPartEdit.as_view(), name='supplier-part-edit'),
+
+ url(r'^pricing/', views.SupplierPartDetail.as_view(template_name='company/supplier_part_pricing.html'), name='supplier-part-pricing'),
url('^.*$', views.SupplierPartDetail.as_view(), name='supplier-part-detail'),
]
diff --git a/InvenTree/company/views.py b/InvenTree/company/views.py
index 24bce08bc9..d37b72e707 100644
--- a/InvenTree/company/views.py
+++ b/InvenTree/company/views.py
@@ -149,7 +149,7 @@ class CompanyDelete(AjaxDeleteView):
class SupplierPartDetail(DetailView):
""" Detail view for SupplierPart """
model = SupplierPart
- template_name = 'company/partdetail.html'
+ template_name = 'company/supplier_part_detail.html'
context_object_name = 'part'
queryset = SupplierPart.objects.all()