{% extends "base.html" %} {% from "components/client_select.html" import client_select %} {% block content %}

{{ _('Unpaid Hours Report') }}

{{ client_select('client_id', clients, selected_id=selected_client, required=False, only_one_client=only_one_client|default(false), single_client=single_client) }}

{{ _('Summary') }}

{{ _('Total Unpaid Hours') }}
{{ "%.2f"|format(summary.total_unpaid_hours) }}
{{ _('Estimated Amount') }}
{{ "%.2f"|format(summary.total_estimated_amount) }}
{{ _('Clients with Unpaid Hours') }}
{{ summary.clients_count }}

{{ _('Unpaid Hours by Client') }}

{% if client_data %}
{% for data in client_data %} {% endfor %}
{{ _('Client') }} {{ _('Total Hours') }} {{ _('Estimated Amount') }} {{ _('Projects') }}
{{ data.client.name }}
{% if data.client.email %}
{{ data.client.email }}
{% endif %}
{{ "%.2f"|format(data.total_hours) }} {{ _('hours') }} {{ "%.2f"|format(data.estimated_amount) }} {% for project in data.projects %}
{{ project.project.name }} : {{ "%.2f"|format(project.hours) }}h {% if project.rate > 0 %} @ {{ "%.2f"|format(project.rate) }}/h {% endif %}
{% endfor %}
{% else %}

{{ _('No unpaid hours found for the selected period.') }}

{% endif %}
{% endblock %} {% block scripts_extra %} {% endblock %}