{% extends "base.html" %} {% from "components/ui.html" import page_header %} {% block content %} {% set breadcrumbs = [ {'text': 'Mileage'} ] %} {{ page_header( icon_class='fas fa-car', title_text='Mileage Tracking', subtitle_text='Track and manage vehicle mileage expenses', breadcrumbs=breadcrumbs, actions_html='New Mileage Entry' ) }}

Total Distance

{{ '%.2f'|format(total_distance) }} km

Total Amount

€{{ '%.2f'|format(total_amount) }}

Total Entries

{{ pagination.total if pagination else (mileage_entries|length) }}

{{ _('Filter Mileage') }}

{{ mileage_entries|length }} entr{{ 'ies' if mileage_entries|length != 1 else 'y' }} found

{% if current_user.is_admin %}
{% endif %}
{% if current_user.is_admin %} {% endif %} {% if mileage_entries %} {% for entry in mileage_entries %} {% if current_user.is_admin %} {% endif %} {% endfor %} {% endif %}
Date Purpose Route Distance Amount Status Actions
{{ entry.date.strftime('%Y-%m-%d') if entry.date else (entry.trip_date.strftime('%Y-%m-%d') if entry.trip_date else '—') }} {{ entry.purpose }} {% if entry.project %}
{{ entry.project.name }}
{% endif %}
{{ entry.start_location }} {{ entry.end_location }}
{{ '%.2f'|format(entry.distance_km) }} km {{ entry.currency_code or 'EUR' }} {{ '%.2f'|format(entry.total_amount or (entry.calculated_amount or 0)) }} {% if entry.status == 'pending' %} Pending {% elif entry.status == 'approved' %} Approved {% elif entry.status == 'rejected' %} Rejected {% elif entry.status == 'reimbursed' %} Reimbursed {% else %} {{ entry.status|title }} {% endif %} View
{% if not mileage_entries %} {% from "components/ui.html" import empty_state %} {% set actions %} Create Your First Mileage Entry Learn More {% endset %} {% if request.args.get('search') or request.args.get('status') %} {{ empty_state('fas fa-search', 'No Mileage Entries Match Your Filters', 'Try adjusting your filters to see more results. You can clear filters or create a new mileage entry that matches your criteria.', actions, type='no-results') }} {% else %} {{ empty_state('fas fa-car', 'No Mileage Entries Yet', 'Track your business travel mileage for reimbursement. Create your first mileage entry to get started!', actions, type='no-data') }} {% endif %} {% endif %}
{% endblock %} {% block scripts_extra %} {% endblock %}