{% extends 'base.html' %} {% load static %} {% block title %}{{ expense.expense_number }} - Optinet Global Links{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{{ expense.expense_number }}

{{ expense.title }}

{{ expense.get_status_display }} {% if can_manage and expense.status == 'pending' %} Review {% endif %}
Expense Details
Employee: {{ expense.employee.full_name }}
Category: {{ expense.category.name }}
Amount: KSh {{ expense.amount|floatformat:2 }}
Expense Date: {{ expense.expense_date|date:"F d, Y" }}
Submitted: {{ expense.submitted_at|date:"F d, Y H:i" }}
{% if expense.budget_allocation %} {% endif %} {% if expense.vendor_name %} {% endif %} {% if expense.vendor_contact %} {% endif %}
Budget Allocation: {{ expense.budget_allocation.category.name }}
Vendor: {{ expense.vendor_name }}
Vendor Contact: {{ expense.vendor_contact }}
Reimbursable: {% if expense.is_reimbursable %} Yes {% else %} No {% endif %}
Status: {{ expense.get_status_display }}
{% if expense.description %}
Description:

{{ expense.description|linebreaks }}

{% endif %} {% if expense.notes %}
Additional Notes:

{{ expense.notes|linebreaks }}

{% endif %} {% if expense.rejection_reason %}
Rejection Reason:

{{ expense.rejection_reason|linebreaks }}

{% endif %}
{% if attachments %}
Attachments ({{ attachments|length }})
{% for attachment in attachments %}
{{ attachment.title }}

{{ attachment.get_attachment_type_display }}

{{ attachment.file_size_formatted }} • {{ attachment.uploaded_at|date:"M d, Y" }}
{% endfor %}
{% endif %}
Actions
Back to Expenses {% if can_manage and expense.status == 'pending' %} Approve/Reject {% endif %} {% if expense.status == 'approved' and can_manage %} Mark as Paid {% endif %}
{% if approval_logs %}
Approval History
{% for log in approval_logs %}
{{ log.get_action_display }}

by {{ log.performed_by.get_full_name|default:log.performed_by.username }}

{{ log.timestamp|date:"M d, Y H:i" }} {% if log.comments %}

{{ log.comments }}

{% endif %}
{% endfor %}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}