{% extends "stock/stock_app_base.html" %} {% load static %} {% block content %}

Stock Item Details

{% if item.serialized %}

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

{% else %}

{{ 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.serialized %}
This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted.
{% elif item.delete_on_deplete %}
This stock item will be automatically deleted when all stock is depleted.
{% endif %}
{% if item.belongs_to %} {% elif item.location %} {% 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.URL %} {% endif %} {% if item.supplier_part %} {% endif %} {% if item.stocktake_date %} {% else %} {% endif %} {% if item.notes %} {% endif %}
Part {% include "hover_image.html" with image=item.part.image hover=True %} {{ item.part.full_name }}
Belongs To {{ item.belongs_to }}
Location {{ item.location.name }}
Serial Number {{ item.serial }}
Quantity {{ item.quantity }}
Batch {{ item.batch }}
Build {{ item.build }}
Purchase Order {{ item.purchase_order }}
Customer {{ item.customer.name }}
URL {{ item.URL }}
Supplier {{ item.supplier_part.supplier.name }}
Supplier Part {{ item.supplier_part.SKU }}
Last Updated {{ item.updated }}
Last Stocktake{{ item.stocktake_date }} {{ item.stocktake_user }}No stocktake performed
Status {{ item.get_status_display }}
Notes {{ item.notes }}

Stock Tracking Information

{% endblock %} {% block js_ready %} {{ block.super }} $("#new-entry").click(function() { launchModalForm( "{% url 'stock-tracking-create' item.id %}", { reload: true, } ); }); $("#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 %}" }); }); loadStockTrackingTable($("#track-table"), { params: function(p) { return { ordering: '-date', item: {{ item.pk }}, }; }, url: "{% url 'api-stock-track' %}", }); {% endblock %}