{% extends "stock/stock_app_base.html" %} {% load static %} {% load inventree_extras %} {% load status_codes %} {% load i18n %} {% block content %} {% if item.sales_order_line %}
{% trans "This stock item is allocated to Sales Order" %} {{ item.sales_order_line.order }}
{% endif %}

{% trans "Stock Item Details" %}

{% if item.serialized %}

{{ item.part.full_name}} # {{ item.serial }}

{% else %}

{% decimal item.quantity %} × {{ item.part.full_name }}

{% endif %}

{% include "qr_button.html" %} {% if item.in_stock %} {% if not item.serialized %} {% if item.part.trackable %} {% endif %} {% endif %} {% endif %} {% if item.can_delete %} {% endif %}

{% 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 %}
{% trans "This stock item will be automatically deleted when all stock is depleted." %}
{% endif %} {% if item.parent %}
{% trans "This stock item was split from " %}{{ item.parent }}
{% endif %}
{% if item.belongs_to %} {% elif item.location %} {% endif %} {% if item.uid %} {% endif %} {% if item.serialized %} {% else %} {% endif %} {% if item.batch %} {% endif %} {% if item.build %} {% endif %} {% if item.purchase_order %} {% endif %} {% if item.customer %} {% endif %} {% if item.link %} {% endif %} {% if item.supplier_part %} {% endif %} {% if item.stocktake_date %} {% else %} {% endif %}
Part {% include "hover_image.html" with image=item.part.image hover=True %} {{ item.part.full_name }}
{% trans "Belongs To" %} {{ item.belongs_to }}
{% trans "Location" %} {{ item.location.name }}
{% trans "Unique Identifier" %} {{ item.uid }}
{% trans "Serial Number" %} {{ item.serial }}
{% trans "Quantity" %} {% decimal item.quantity %} {% if item.part.units %}{{ item.part.units }}{% endif %}
{% trans "Batch" %} {{ item.batch }}
{% trans "Build" %} {{ item.build }}
{% trans "Purchase Order" %} {{ item.purchase_order }}
{% trans "Customer" %} {{ item.customer.name }}
{% 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 item.status %}

{% block details %} {% endblock %}
{% endblock %} {% block js_ready %} {{ block.super }} $("#stock-serialize").click(function() { launchModalForm( "{% url 'stock-item-serialize' item.id %}", { reload: true, } ); }); $("#stock-duplicate").click(function() { launchModalForm( "{% url 'stock-item-create' %}", { 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, }); }); {% if item.in_stock %} function itemAdjust(action) { launchModalForm("/stock/adjust/", { data: { action: action, item: {{ item.id }}, }, reload: true, follow: true, } ); } $("#stock-move").click(function() { itemAdjust("move"); }); $("#stock-count").click(function() { itemAdjust('count'); }); $('#stock-remove').click(function() { itemAdjust('take'); }); $('#stock-add').click(function() { itemAdjust('add'); }); {% endif %} $("#stock-delete").click(function () { launchModalForm( "{% url 'stock-item-delete' item.id %}", { redirect: "{% url 'part-stock' item.part.id %}" }); }); {% endblock %}