{% extends "order/order_base.html" %} {% load inventree_extras %} {% load i18n %} {% load static %} {% block details %} {% include 'order/tabs.html' with tab='details' %}
{% if order.status == OrderStatus.PENDING %} {% endif %}

{% trans "Order Items" %}

{% if not order.status == OrderStatus.PENDING %} {% endif %} {% for line in order.lines.all %} {% if line.part %} {% else %} {% endif %} {% if not order.status == OrderStatus.PENDING %} {% endif %} {% endfor %}
{% trans "Line" %} {% trans "Part" %} {% trans "Description" %} {% trans "Order Code" %} {% trans "Reference" %} {% trans "Quantity" %}{% trans "Received" %}{% trans "Note" %}
{{ forloop.counter }} {% include "hover_image.html" with image=line.part.part.image hover=True %} {{ line.part.part.full_name }} {{ line.part.part.description }} {{ line.part.SKU }}Warning: Part has been deleted.{{ line.reference }} {% decimal line.quantity %}{% decimal line.received %} {{ line.notes }}
{% if order.status == OrderStatus.PENDING %} {% endif %} {% if order.status == OrderStatus.PLACED and line.received < line.quantity %} {% endif %}
{% endblock %} {% block js_ready %} {{ block.super }} $("#po-lines-table").on('click', ".line-receive", function() { var button = $(this); console.log('clicked! ' + button.attr('pk')); launchModalForm("{% url 'po-receive' order.id %}", { reload: true, data: { line: button.attr('pk') }, secondary: [ { field: 'location', label: 'New Location', title: 'Create new stock location', url: "{% url 'stock-location-create' %}", }, ] }); }); $("#receive-order").click(function() { launchModalForm("{% url 'po-receive' order.id %}", { reload: true, secondary: [ { field: 'location', label: 'New Location', title: 'Create new stock location', url: "{% url 'stock-location-create' %}", }, ] }); }); $("#complete-order").click(function() { launchModalForm("{% url 'po-complete' order.id %}", { reload: true, }); }); $("#export-order").click(function() { location.href = "{% url 'po-export' order.id %}"; }); {% if order.status == OrderStatus.PENDING %} $('#new-po-line').click(function() { launchModalForm("{% url 'po-line-item-create' %}", { reload: true, data: { order: {{ order.id }}, }, secondary: [ { field: 'part', label: 'New Supplier Part', title: 'Create new supplier part', url: "{% url 'supplier-part-create' %}", data: { supplier: {{ order.supplier.id }}, }, }, ], } ); }); {% endif %} $("#po-lines-table").inventreeTable({ }); {% endblock %}