{% 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 %}
{% if order.customer %}
|
{% trans "Customer" %} |
{{ order.customer.name }}{% include "clip.html" %} |
{% endif %}
{% if order.customer_reference %}
|
{% trans "Customer Reference" %} |
{{ order.customer_reference }}{% include "clip.html" %} |
{% endif %}
{% if order.link %}
|
{% trans "External Link" %} |
{% include 'clip_link.html' with link=order.link new_window=True %} |
{% endif %}
|
{% trans "Created" %} |
{% render_date order.creation_date %}{{ order.created_by }} |
{% if order.issue_date %}
|
{% trans "Issued" %} |
{% render_date order.issue_date %} |
{% endif %}
{% if order.target_date %}
|
{% trans "Target Date" %} |
{% render_date order.target_date %}
{% if order.is_overdue %}{% endif %}
|
{% endif %}
{% if order.contact %}
|
{% trans "Contact" %} |
{{ order.contact.name }} |
{% endif %}
{% if order.address %}
|
{% trans "Address" %} |
{{ order.address.title }}: {{ order.address }} |
{% endif %}
{% if order.responsible %}
|
{% trans "Responsible" %} |
{{ order.responsible }} |
{% endif %}
{% include "currency_data.html" with instance=order %}
|
{% 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 %}