{% extends "two_column.html" %} {% load i18n %} {% load static %} {% load inventree_extras %} {% load status_codes %} {% block page_title %} {% inventree_title %} | {% trans "Purchase Order" %} {% endblock %} {% block thumbnail %} {% endblock %} {% block page_data %}

{% trans "Purchase Order" %} {{ order.reference }} {% if user.is_staff and roles.purchase_order.change %} {% endif %}

{% purchase_order_status_label order.status large=True %} {% if order.is_overdue %} {% trans "Overdue" %} {% endif %}


{{ order.description }}

{% if roles.purchase_order.change %} {% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %} {% elif order.status == PurchaseOrderStatus.PLACED %} {% endif %} {% if order.can_cancel %} {% endif %} {% endif %}
{% endblock %} {% block page_details %}

{% trans "Purchase Order Details" %}

{% if order.supplier_reference %} {% endif %} {% if order.link %} {% endif %} {% if order.issue_date %} {% endif %} {% if order.target_date %} {% endif %} {% if order.status == PurchaseOrderStatus.COMPLETE %} {% endif %} {% if order.responsible %} {% endif %}
{% trans "Order Reference" %} {{ order.reference }}
{% trans "Order Status" %} {% purchase_order_status_label order.status %} {% if order.is_overdue %} {% trans "Overdue" %} {% endif %}
{% trans "Supplier" %} {{ order.supplier.name }}
{% trans "Supplier Reference" %} {{ order.supplier_reference }}
External Link {{ order.link }}
{% trans "Created" %} {{ order.creation_date }}{{ order.created_by }}
{% trans "Issued" %} {{ order.issue_date }}
{% trans "Target Date" %} {{ order.target_date }}
{% trans "Received" %} {{ order.complete_date }}{{ order.received_by }}
{% trans "Responsible" %} {{ order.responsible }}
{% endblock %} {% block js_ready %} {{ block.super }} enableNavbar({ label: 'po', toggleId: '#po-menu-toggle', }); {% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %} $("#place-order").click(function() { launchModalForm("{% url 'po-issue' order.id %}", { reload: true, }); }); {% endif %} $('#print-order-report').click(function() { printPurchaseOrderReports([{{ order.pk }}]); }); $("#edit-order").click(function() { launchModalForm("{% url 'po-edit' order.id %}", { reload: true, } ); }); $("#cancel-order").click(function() { launchModalForm("{% url 'po-cancel' order.id %}", { reload: true, }); }); {% endblock %}