{% extends "page_base.html" %} {% load i18n %} {% load static %} {% load barcode %} {% load inventree_extras %} {% load generic %} {% block page_title %} {% inventree_title %} | {% trans "Return Order" %} {% endblock page_title %} {% block breadcrumbs %} {% endblock breadcrumbs %} {% block thumbnail %} {% trans {% endblock thumbnail %} {% block heading %} {% trans "Return Order" %} {{ order.reference }} {% endblock heading %} {% block actions %} {% admin_url user "order.returnorder" order.pk as url %} {% include "admin_button.html" with url=url %} {% if barcodes %}
{% endif %}
{% if roles.return_order.change %}
{% if order.can_issue %} {% elif order.status == ReturnOrderStatus.IN_PROGRESS %} {% endif %}
{% endif %} {% endblock actions %} {% block details %} {% include "project_code_data.html" with instance=order %} {% include "barcode_data.html" with instance=order %}
{% trans "Order Reference" %} {{ order.reference }}{% include "clip.html" %}
{% trans "Order Description" %} {{ order.description }}{% include "clip.html" %}
{% trans "Order Status" %} {% display_status_label 'return_order' order.status_custom_key order.status %} {% if order.is_overdue %} {% trans "Overdue" %} {% endif %}
{% endblock details %} {% block details_right %} {% if order.customer %} {% endif %} {% if order.customer_reference %} {% endif %} {% if order.link %} {% endif %} {% if order.issue_date %} {% endif %} {% if order.target_date %} {% endif %} {% if order.contact %} {% endif %} {% if order.address %} {% endif %} {% if order.responsible %} {% endif %} {% include "currency_data.html" with instance=order %}
{% trans "Customer" %} {{ order.customer.name }}{% include "clip.html" %}
{% trans "Customer Reference" %} {{ order.customer_reference }}{% include "clip.html" %}
{% trans "External Link" %} {% include 'clip_link.html' with link=order.link new_window=True %}
{% trans "Created" %} {% render_date order.creation_date %}{{ order.created_by }}
{% trans "Issued" %} {% render_date order.issue_date %}
{% trans "Target Date" %} {% render_date order.target_date %} {% if order.is_overdue %}{% endif %}
{% trans "Contact" %} {{ order.contact.name }}
{% trans "Address" %} {{ order.address.title }}: {{ order.address }}
{% trans "Responsible" %} {{ order.responsible }}
{% trans "Total Cost" %} {% with order.total_price as tp %} {% if tp == None %} {% trans "Total cost could not be calculated" %} {% else %} {% render_currency tp currency=order.currency %} {% endif %} {% endwith %}
{% endblock details_right %} {% block js_ready %} {{ block.super }} {% if roles.return_order.change %} {% if order.can_issue %} $('#issue-order').click(function() { issueReturnOrder({{ order.pk }}, { reload: true, }); }); {% elif order.status == ReturnOrderStatus.IN_PROGRESS %} $('#complete-order').click(function() { completeReturnOrder( {{ order.pk }}, { reload: true, } ); }) {% endif %} $('#edit-order').click(function() { editReturnOrder({{ order.pk }}, { reload: true, }); }); {% if order.can_cancel %} $('#cancel-order').click(function() { cancelReturnOrder( {{ order.pk }}, { reload: true } ); }); {% endif %} {% if order.can_hold %} $("#hold-order").click(function() { holdOrder( '{% url "api-ro-hold" order.pk %}', { reload: true, } ); }); {% endif %} {% endif %} {% if report_enabled %} $('#print-order-report').click(function() { printReports('returnorder', [{{ order.pk }}]); }); {% endif %} {% if barcodes %} $('#show-qr-code').click(function() { showQRDialog( '{% trans "Return Order QR Code" escape %}', `{% clean_barcode order.barcode %}` ); }); {% if roles.return_order.change %} $("#barcode-link").click(function() { linkBarcodeDialog( { returnorder: {{ order.pk }}, }, { title: '{% trans "Link Barcode to Return Order" escape %}', } ); }); $("#barcode-unlink").click(function() { unlinkBarcode({ returnorder: {{ order.pk }}, }); }); {% endif %} {% endif %} {% endblock js_ready %}