{% extends 'base.html' %} {% block content %}
{% set rt = tr.reimb_type %} {% set type_name = rt.name if rt else 'Reimbursement' %} {% set show_route = rt.requires_route_fields if rt else true %} {% set show_km = rt.requires_km_fields if rt else false %}

{{ type_name }} – {{ tr.employee.full_name }}

Request ID: #{{ tr.id }} {% if tr.created_on %} · Submitted: {{ tr.created_on.strftime('%Y-%m-%d %H:%M') }} {% endif %}
{{ tr.status.replace('_',' ').title() }} {% if current_user.id == tr.employee_id and tr.status in ['pending_manager','rejected'] %} Edit {% endif %} Print Back
Date Range: {{ tr.from_date }} to {{ tr.to_date }}
{% if show_km %}
Total KMs: {{ '%.2f'|format(tr.total_kms or 0) }}
{% endif %}
Total Amount: ₹ {{ '%.2f'|format(tr.total_amount or 0) }}
{% if show_route %} {% endif %} {% if show_km %} {% endif %} {% for it in tr.items %} {% if show_route %} {% endif %} {% if show_km %} {% endif %} {% endfor %} {% set colspan = 2 %} {% if show_route %}{% set colspan = colspan + 2 %}{% endif %} {% if show_km %}{% set colspan = colspan + 2 %}{% endif %}
ModeFrom ToKMs RateAmount Remarks Attachment
{{ it.mode }}{{ it.from_loc or '—' }} {{ it.to_loc or '—' }}{{ '%.2f'|format(it.kms_total or 0) }} ₹ {{ '%.2f'|format(it.rate or 0) }}₹ {{ '%.2f'|format(it.amount or 0) }} {{ it.notes or '—' }} {% if it.attachment_path %} View {% if it.attachment_name %}
{{ it.attachment_name }}
{% endif %} {% else %} — {% endif %}
Totals: ₹ {{ '%.2f'|format(tr.total_amount or 0) }}
Approval History
{% if logs and logs|length %}
{% for lg in logs %} {% endfor %}
When By Role Action Remark
{{ lg.acted_on.strftime('%Y-%m-%d %H:%M') if lg.acted_on else '' }} {{ lg.actor.full_name if lg.actor else ('#' ~ lg.actor_id) }} {{ (lg.actor_role or '').upper() }} {{ (lg.action or '').title() }} {{ lg.remark or '—' }}
{% else %}
No approval activity yet.
{% endif %}
{% endblock %}