{% extends "page_base.html" %} {% load static %} {% load i18n %} {% load barcode %} {% load inventree_extras %} {% block page_title %} {% inventree_title %} | {% trans "Supplier Part" %} {% endblock page_title %} {% block sidebar %} {% include "company/supplier_part_sidebar.html" %} {% endblock sidebar %} {% block breadcrumbs %} {% if part.supplier %} {% endif %} {% endblock breadcrumbs %} {% block heading %}

{% trans "Supplier Part" %}: {{ part.SKU }}

{% endblock heading %} {% block actions %} {% admin_url user "company.supplierpart" part.pk as url %} {% include "admin_button.html" with url=url %} {% if barcodes %}
{% endif %} {% if roles.purchase_order.change or roles.purchase_order.add or roles.purchase_order.delete %}
{% endif %} {% endblock actions %} {% block thumbnail %} {% trans 'Part image' %} {% endblock thumbnail %} {% block details %} {% if part.description %} {% endif %} {% if part.availability_updated %} {% endif %} {% include "barcode_data.html" with instance=part %}
{% trans "Internal Part" %} {% if part.part %} {{ part.part.full_name }}{% include "clip.html" %} {% endif %}
{% trans "Description" %} {{ part.description }}{% include "clip.html" %}
{% trans "Available" %} {% decimal part.available %}{% render_date part.availability_updated %}
{% endblock details %} {% block details_right %} {% if part.manufacturer_part.manufacturer %} {% endif %} {% if part.manufacturer_part.MPN %} {% endif %} {% if part.packaging %} {% endif %} {% if part.pack_quantity %} {% endif %} {% if part.note %} {% endif %} {% if part.link %} {% endif %}
{% trans "Supplier" %} {% if part.supplier %} {{ part.supplier.name }}{% include "clip.html" %} {% else %} {% trans "No supplier information available" %} {% endif %}
{% trans "SKU" %} {{ part.SKU }}{% include "clip.html" %}
{% trans "Manufacturer" %} {{ part.manufacturer_part.manufacturer.name }}{% include "clip.html" %}
{% trans "MPN" %} {{ part.manufacturer_part.MPN }}{% include "clip.html" %}
{% trans "Packaging" %} {{ part.packaging }}{% include "clip.html" %}
{% trans "Units" %} {% if part.part.units %} [ {% include "part/part_units.html" with part=part.part %}] {% endif %} {{ part.pack_quantity }} {% include "clip.html" %} {% if part.part.units and part.pack_quantity_native %} {% endif %}
{% trans "Note" %} {{ part.note }}{% include "clip.html" %}
{% trans "External Link" %} {% include 'clip_link.html' with link=part.link new_window=True %}
{% endblock details_right %} {% block page_content %}

{% trans "Supplier Part Stock" %}

{% include "spacer.html" %}
{% include "stock_table.html" %}

{% trans "Supplier Part Orders" %}

{% include "spacer.html" %}
{% if roles.purchase_order.add %} {% endif %}
{% include "filter_list.html" with id='purchaseorder' %}

{% trans "Pricing Information" %}

{% include "spacer.html" %}
{% if roles.purchase_order.add %} {% endif %}
{% include "filter_list.html" with id='supplierpricebreak' %}

{% trans "Supplier Part Notes" %}

{% include "spacer.html" %}
{% include "notes_buttons.html" %}
{% endblock page_content %} {% block js_ready %} {{ block.super }} // Load the "notes" tab onPanelLoad('supplier-part-notes', function() { setupNotesField( 'supplier-part-notes', '{% url "api-supplier-part-detail" part.pk %}', { model_type: "supplierpart", model_id: {{ part.pk }}, editable: {% js_bool roles.purchase_order.change %}, } ); }); {% if barcodes %} $("#show-qr-code").click(function() { showQRDialog( '{% trans "Supplier Part QR Code" escape %}', `{% clean_barcode part.barcode %}` ); }); $("#barcode-link").click(function() { linkBarcodeDialog( { supplierpart: {{ part.pk }}, }, { title: '{% trans "Link Barcode to Supplier Part" escape %}', } ); }); $("#barcode-unlink").click(function() { unlinkBarcode({ supplierpart: {{ part.pk }}, }); }); {% endif %} loadSupplierPriceBreakTable({ part: {{ part.pk }} }); $('#new-price-break').click(function() { createSupplierPartPriceBreak({{ part.pk }}, { onSuccess: function() { $("#price-break-table").bootstrapTable('refresh'); } }); }); loadPurchaseOrderTable($("#purchase-order-table"), { params: { supplier_part: {{ part.id }}, } }); loadStockTable($("#stock-table"), { params: { supplier_part: {{ part.id }}, location_detail: true, part_detail: false, }, }); $("#item-create").click(function() { createNewStockItem({ data: { part: {{ part.part.id }}, supplier_part: {{ part.id }}, }, }); }); $('#order-part, #order-part2').click(function() { inventreeGet( '{% url "api-part-detail" part.part.pk %}', {}, { success: function(response) { orderParts([response], { supplier_part: {{ part.pk }}, {% if part.supplier %} supplier: {{ part.supplier.pk }}, {% endif %} }); } } ); }); {% if roles.purchase_order.change %} $('#update-part-availability').click(function() { editSupplierPart({{ part.pk }}, { fields: { available: {}, }, title: '{% trans "Update Part Availability" escape %}', onSuccess: function() { location.reload(); } }); }); $('#duplicate-part').click(function() { duplicateSupplierPart({{ part.pk }}, { follow: true }); }); $('#edit-part').click(function () { editSupplierPart({{ part.pk }}, { onSuccess: function() { location.reload(); } }); }); {% endif %} $('#delete-part').click(function() { inventreeGet( '{% url "api-supplier-part-detail" part.pk %}', {}, { success: function(part) { deleteSupplierParts([part], { success: function() { {% if part.supplier %} window.location.href = '{% url "company-detail" part.supplier.id %}'; {% else %} window.location.href = '{% url "index" %}'; {% endif %} } }); } } ); }); enableSidebar('supplierpart'); {% endblock js_ready %}