{% extends 'base.html' %} {% load static humanize %} {% block content %}
Expense #{{ expense.reference }}
Back to List {% if expense.can_edit %} Edit {% endif %} {% if expense.can_delete %} Delete {% endif %}
{{ expense.get_status_display }}
Created: {{ expense.created_at|date:"M d, Y H:i" }} {% if expense.updated_at and expense.updated_at != expense.created_at %} • Updated: {{ expense.updated_at|date:"M d, Y H:i" }} {% endif %}
Expense Details
{% if expense.supplier %} {% endif %}
Date {{ expense.date|date:"M d, Y" }}
Category {{ expense.category }}
Payment Method {{ expense.get_payment_method_display|default:"-" }}
Reference {{ expense.reference }}
Supplier {{ expense.supplier.name }}
Description {{ expense.description|linebreaksbr|default:"-" }}
{% if expense.notes %}
Notes
{{ expense.notes|linebreaksbr }}
{% endif %}
Amount Summary
{% if expense.payment_date %} {% endif %} {% if expense.payment_reference %} {% endif %}
Subtotal ${{ expense.subtotal|floatformat:2|intcomma }}
Tax ({{ expense.tax_rate }}%) ${{ expense.tax_amount|floatformat:2|intcomma }}
Total ${{ expense.total_amount|floatformat:2|intcomma }}
Payment Date {{ expense.payment_date|date:"M d, Y" }}
Payment Reference {{ expense.payment_reference }}
{% if expense.status == 'approved' and not expense.payment_date and expense.can_pay %} {% endif %}
{% if expense.attachments.exists %}
Attachments ({{ expense.attachments.count }})
{% for attachment in expense.attachments.all %}
{{ attachment.file.size|filesizeformat }}
{% if attachment.description %}
{{ attachment.description }}
{% endif %}
{% endfor %}
{% endif %}
Expense Items
{% for item in expense.items.all %} {% empty %} {% endfor %}
# Description Quantity Unit Price Amount
{{ forloop.counter }}
{{ item.description }}
{% if item.notes %}
{{ item.notes }}
{% endif %}
{{ item.quantity|floatformat:2|intcomma }} {{ item.unit|default:'' }} ${{ item.unit_price|floatformat:2|intcomma }} ${{ item.amount|floatformat:2|intcomma }}
No items found.
Subtotal: ${{ expense.subtotal|floatformat:2|intcomma }}
Tax ({{ expense.tax_rate }}%): ${{ expense.tax_amount|floatformat:2|intcomma }}
Total: ${{ expense.total_amount|floatformat:2|intcomma }}
{% if expense.audit_logs.exists %}
Activity Log
{% for log in expense.audit_logs.all %}
{{ log.get_action_display }} by {{ log.user.get_full_name|default:log.user.email }}
{{ log.timestamp|date:"M d, Y H:i" }}
{% if log.notes %}
{{ log.notes|linebreaksbr }}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}