{% extends "two_column.html" %} {% load static %} {% load inventree_extras %} {% load status_codes %} {% load i18n %} {% block page_title %} InvenTree | {% trans "Stock Item" %} - {{ item }} {% endblock %} {% block sidenav %}
{% endblock %} {% block pre_content %} {% include 'stock/loc_link.html' with location=item.location %} {% if item.hasRequiredTests and not item.passedAllRequiredTests %}
{% trans "This stock item has not passed all required tests" %}
{% endif %} {% for allocation in item.sales_order_allocations.all %}
{% trans "This stock item is allocated to Sales Order" %} #{{ allocation.line.order.reference }} ({% trans "Quantity" %}: {% decimal allocation.quantity %})
{% endfor %} {% for allocation in item.allocations.all %}
{% trans "This stock item is allocated to Build" %} #{{ allocation.build.id }} ({% trans "Quantity" %}: {% decimal allocation.quantity %})
{% endfor %} {% if item.serialized %}
{% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
{% elif item.child_count > 0 %}
{% trans "This stock item cannot be deleted as it has child items" %}
{% elif item.delete_on_deplete and item.can_delete %}
{% trans "This stock item will be automatically deleted when all stock is depleted." %}
{% endif %} {% endblock %} {% block thumbnail %} {% endblock %} {% block page_data %}

{% trans "Stock Item" %} {% stock_status_label item.status large=True %}


{% if roles.part.view %} {% endif %} {{ item.part.full_name}} {% if roles.part.view %} {% endif %} {% if item.serialized %} # {{ item.serial }} {% else %} × {% decimal item.quantity %} {% endif %} {% if user.is_staff and roles.stock.change %} {% endif %}

{% if roles.stock.change %}
{% endif %} {% if roles.stock.change %}
{% endif %}
{% endblock %} {% block page_details %}

{% trans "Stock Item Details" %}

{% if item.serialized %} {% else %} {% endif %} {% if item.customer %} {% endif %} {% if item.belongs_to %} {% elif item.sales_order %} {% elif item.build_order %} {% else %} {% if item.location %} {% else %} {% endif %} {% endif %} {% if item.uid %} {% endif %} {% if item.batch %} {% endif %} {% if item.build %} {% endif %} {% if item.purchase_order %} {% endif %} {% if item.parent %} {% endif %} {% if item.link %} {% endif %} {% if item.supplier_part %} {% endif %} {% if item.stocktake_date %} {% else %} {% endif %} {% if item.hasRequiredTests %} {% endif %}
{% trans "Base Part" %} {% if roles.part.view %} {% endif %} {{ item.part.full_name }} {% if roles.part.view %} {% endif %}
{% trans "Serial Number" %} {{ item.serial }}
{% trans "Quantity" %} {% decimal item.quantity %} {% if item.part.units %}{{ item.part.units }}{% endif %}
{% trans "Customer" %} {{ item.customer.name }}
{% trans "Installed In" %} {{ item.belongs_to }}
{% trans "Sales Order" %} {{ item.sales_order.reference }} - {{ item.sales_order.customer.name }}
{% trans "Build Order" %} {{ item.build_order }}
{% trans "Location" %}{{ item.location.name }}{% trans "No location set" %}
{% trans "Barcode Identifier" %} {{ item.uid }}
{% trans "Batch" %} {{ item.batch }}
{% trans "Build" %} {{ item.build }}
{% trans "Purchase Order" %} {{ item.purchase_order }}
{% trans "Parent Item" %} {% trans "Stock Item" %} #{{ item.parent.id }}
{% trans "External Link" %} {{ item.link }}
{% trans "Supplier" %} {{ item.supplier_part.supplier.name }}
{% trans "Supplier Part" %} {{ item.supplier_part.SKU }}
{% trans "Last Updated" %} {{ item.updated }}
{% trans "Last Stocktake" %}{{ item.stocktake_date }} {{ item.stocktake_user }}{% trans "No stocktake performed" %}
{% trans "Status" %} {% stock_status_label item.status %}
{% trans "Tests" %} {{ item.requiredTestStatus.passed }} / {{ item.requiredTestStatus.total }}
{% endblock %} {% block js_ready %} {{ block.super }} loadTree("{% url 'api-stock-tree' %}", "#stock-tree", { name: 'stock', } ); $("#toggle-stock-tree").click(function() { toggleSideNav("#sidenav"); return false; }) initSideNav(); $("#stock-serialize").click(function() { launchModalForm( "{% url 'stock-item-serialize' item.id %}", { reload: true, } ); }); $('#stock-uninstall').click(function() { launchModalForm( "{% url 'stock-item-uninstall' %}", { data: { 'items[]': [{{ item.pk}}], }, reload: true, } ); }); $("#stock-test-report").click(function() { launchModalForm( "{% url 'stock-item-test-report-select' item.id %}", { follow: true, } ); }); $("#print-label").click(function() { launchModalForm( "{% url 'stock-item-label-select' item.id %}", { follow: true, } ) }); $("#stock-duplicate").click(function() { createNewStockItem({ follow: true, data: { copy: {{ item.id }}, } }); }); $("#stock-edit").click(function () { launchModalForm( "{% url 'stock-item-edit' item.id %}", { reload: true, submit_text: "Save", } ); }); $("#show-qr-code").click(function() { launchModalForm("{% url 'stock-item-qr' item.id %}", { no_post: true, }); }); $("#link-barcode").click(function() { linkBarcodeDialog({{ item.id }}); }); $("#unlink-barcode").click(function() { unlinkBarcode({{ item.id }}); }); {% if item.in_stock %} $("#stock-assign-to-customer").click(function() { launchModalForm("{% url 'stock-item-assign' item.id %}", { reload: true, } ); }); function itemAdjust(action) { launchModalForm("/stock/adjust/", { data: { action: action, item: {{ item.id }}, }, reload: true, follow: true, } ); } {% if item.part.has_variants %} $("#stock-convert").click(function() { launchModalForm("{% url 'stock-item-convert' item.id %}", { reload: true, } ); }); {% endif %} $("#stock-move").click(function() { itemAdjust("move"); }); $("#stock-count").click(function() { itemAdjust('count'); }); $('#stock-remove').click(function() { itemAdjust('take'); }); $('#stock-add').click(function() { itemAdjust('add'); }); {% else %} $("#stock-return-from-customer").click(function() { launchModalForm("{% url 'stock-item-return' item.id %}", { reload: true, } ); }); {% endif %} $("#stock-delete").click(function () { launchModalForm( "{% url 'stock-item-delete' item.id %}", { redirect: "{% url 'part-stock' item.part.id %}" } ); }); {% endblock %}