{% extends base_template %} {% load i18n %} {% block title %}{{ loan.reference }}{% endblock %} {% block content %}

{% trans "Loans" %}

{{ loan.reference }}

{{ loan.borrower.get_full_name|default:loan.borrower.username }} · {% trans "issued" %} {{ loan.issued_at|date:"M j, Y" }} {% if loan.request %} · {{ loan.request.reference }}{% endif %}

{% include "inventree_loan/_status_badge.html" with status=loan.status label=loan.get_status_display %} {% trans "Receipt" %} {% if is_desk and loan.is_open %} {% trans "Return items" %} {% endif %}

{% trans "Loan details" %}

{% trans "Borrower" %}
{{ loan.borrower.get_full_name|default:loan.borrower.username }}{% if loan.borrower.email %} <{{ loan.borrower.email }}>{% endif %}
{% trans "Issued by" %}
{{ loan.issued_by.get_full_name|default:loan.issued_by.username }}
{% trans "Issued at" %}
{{ loan.issued_at|date:"M j, Y H:i" }}
{% trans "Due at" %}
{{ loan.due_at|date:"M j, Y H:i" }}{% if loan.is_overdue %} · {{ loan.days_overdue }} {% trans "days overdue" %}{% endif %}
{% if loan.returned_at %}
{% trans "Returned at" %}
{{ loan.returned_at|date:"M j, Y H:i" }}
{% endif %}
{% trans "Renewals" %}
{{ loan.renewals }}
{% trans "Location" %}
{{ loan.checkout_location|default:"—" }}
{% if loan.notes %}
{% trans "Notes" %}
{{ loan.notes|linebreaksbr }}
{% endif %}

{% trans "Loan QR" %}

{% trans "Scan this code at the loan desk to open the return workflow." %}

{% trans 'QR code for this loan' %}

{{ request.scheme }}://{{ request.get_host }}{% url 'plugin:loan:loan_detail' loan.pk %}

{% if is_desk and loan.is_open %}

{% trans "Renew loan" %}

{% trans "Extend the due date for this borrower." %}

{% endif %}

{% trans "Items" %}

{% blocktrans count counter=loan.item_count %}{{ counter }} line{% plural %}{{ counter }} lines{% endblocktrans %}

{% if is_desk %}{% endif %} {% for item in loan.items.all %} {% if is_desk %} {% endif %} {% endfor %}
{% trans "Part" %}{% trans "Asset" %}{% trans "Qty" %}{% trans "Returned" %}{% trans "Remaining" %}{% trans "Status" %}{% trans "Actions" %}
{{ item.part.name }}{% if item.part.IPN %}
{{ item.part.IPN }}
{% endif %}
{{ item.stock_item_display }} {{ item.quantity|floatformat:"-5" }} {{ item.returned_quantity|floatformat:"-5" }} {{ item.remaining_quantity|floatformat:"-5" }} {% if item.lost %} {% trans "Lost" %} {% elif item.is_returned %} {% trans "Returned" %} {% else %} {% trans "On loan" %} {% endif %} {% if item.condition_on_return %}
{{ item.get_condition_on_return_display }}
{% endif %}
{% if item.is_open %} {% trans "Return" %} {% endif %}

{% trans "Timeline" %}

{% if events %} {% else %}

{% trans "No events yet." %}

{% endif %}
{% endblock %}