{% extends "base.html" %}
{% load static %}
{% block page_title %}
InvenTree | {{ order }}
{% endblock %}
{% block content %}
Purchase Order Details
Supplier |
{{ order.supplier }} |
Status |
{% include "order/order_status.html" %} |
Created |
{{ order.creation_date }}{{ order.created_by }} |
{% if order.issue_date %}
Issued |
{{ order.issue_date }} |
{% endif %}
{% if order.status == OrderStatus.COMPLETE %}
Received |
{{ order.complete_date }}{{ order.received_by }} |
{% endif %}
{% if order.status == OrderStatus.PENDING %}
{% endif %}
{% if order.status == OrderStatus.PENDING and order.lines.count > 0 %}
{% elif order.status == OrderStatus.PLACED %}
{% endif %}
Order Items
Line |
Part |
Description |
Order Code |
Reference |
Quantity |
{% if not order.status == OrderStatus.PENDING %}
Received |
{% endif %}
Note |
{% if order.status == OrderStatus.PENDING %}
|
{% endif %}
{% for line in order.lines.all %}
{{ forloop.counter }}
|
{% if line.part %}
{% include "hover_image.html" with image=line.part.part.image hover=True %}
{{ line.part.part.full_name }}
|
{{ line.part.part.description }} |
{{ line.part.SKU }} |
{% else %}
Warning: Part has been deleted. |
{% endif %}
{{ line.reference }} |
{{ line.quantity }} |
{% if not order.status == OrderStatus.PENDING %}
{{ line.received }} |
{% endif %}
{{ line.notes }}
|
{% if order.status == OrderStatus.PENDING %}
|
{% endif %}
{% endfor %}
{% if order.notes %}
{% endif %}
{% endblock %}
{% block js_ready %}
$("#place-order").click(function() {
launchModalForm("{% url 'purchase-order-issue' order.id %}",
{
reload: true,
});
});
$("#edit-order").click(function() {
launchModalForm("{% url 'purchase-order-edit' order.id %}",
{
reload: true,
}
);
});
$("#receive-order").click(function() {
launchModalForm("{% url 'purchase-order-receive' order.id %}", {
reload: true,
});
});
$("#export-order").click(function() {
location.href = "{% url 'purchase-order-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").bootstrapTable({
search: true,
sortable: true,
});
{% endblock %}