{% extends "order/purchase_order_detail.html" %}
{% load inventree_extras %}
{% load i18n %}
{% load static %}
{% block sidebar %}
{% url "po-detail" order.id as url %}
{% trans "Return to Orders" as text %}
{% include "sidebar_item.html" with url=url text=text icon="fa-undo" %}
{% endblock %}
{% block page_content %}
{% trans "Upload File for Purchase Order" as header_text %}
{% trans "Order is already processed. Files cannot be uploaded." as error_text %}
{% with "panel-upload-file" as panel_id %}
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
{% include "patterns/wizard/upload.html" with header_text=header_text upload_go_ahead=True error_text=error_text panel_id=panel_id %}
{% else %}
{% include "patterns/wizard/upload.html" with header_text=header_text upload_go_ahead=False error_text=error_text panel_id=panel_id %}
{% endif %}
{% endwith %}
{% endblock %}
{% block js_ready %}
{{ block.super }}
{% endblock %}