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

Stock Item Details

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

{% include "qr_button.html" %}

{% if item.belongs_to %} {% elif item.location %} {% endif %} {% if item.serial %} {% else %} {% endif %} {% if item.batch %} {% 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 {{ item.part.full_name }}
Belongs To {{ item.belongs_to }}
Location {{ item.location.name }}
Serial {{ item.serial }}
Quantity {{ item.quantity }}
Batch {{ item.batch }}
Customer {{ item.customer.name }}
URL {{ item.URL }}
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 }}
{% if item.has_tracking_info %}

Stock Tracking Information

{% endif %} {% endblock %} {% block js_ready %} {{ block.super }} $("#duplicate-item").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 %} $("#stock-move").click(function() { launchModalForm( "{% url 'stock-item-move' item.id %}", { reload: true, submit_text: "Move" }); }); function itemAdjust(action) { adjustStock({ query: { pk: {{ item.id }}, }, action: action, success: function() { location.reload(); } }); } $("#stock-stocktake").click(function() { itemAdjust('stocktake'); return false; }); $('#stock-remove').click(function() { itemAdjust('remove'); return false; }); $('#stock-add').click(function() { itemAdjust('add'); return false; }); {% 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 %}