{# templates/report/times.html.twig #} {% extends 'base.html.twig' %} {% set monthsShort = deMonthsShort() %} {% block title %}{{ 'app.report.page_title'|trans }}{% endblock %} {% block javascripts %} {{ parent() }} {{ encore_entry_script_tags('report') }} {% endblock %} {% block body %}

{{ 'app.report.heading'|trans }}

{# ── Toolbar ──────────────────────────────────────────────────────── #}
{# ── Filter-Panel ─────────────────────────────────────────────────── #} {% include 'report/_filter-panel.html.twig' %} {# ── Tabellen-Header ───────────────────────────────────────────────── #}
{{ 'app.report.col_date'|trans }}
{{ 'app.report.col_client'|trans }}
{{ 'app.report.col_project'|trans }}
{{ 'app.report.col_service'|trans }}
{{ 'app.report.col_user'|trans }}
{{ 'app.report.col_note'|trans }}
{{ 'app.report.col_hours'|trans }} {{ totalDuration }}
{{ 'app.report.col_revenue'|trans }} {{ totalRevenue|number_format(2, ',', '.') }} €
{# ── Einträge ──────────────────────────────────────────────────── #} {% for entry in entries %} {% set service = entry.service %} {% set billable = (service is null or service.billable) %} {% set hourlyRate = entry.project.client.hourlyRate %} {% set monthShort = monthsShort[entry.date|date('n') - 1] %} {% set canEdit = isAdmin or (entry.userId == currentUserId) %}
{{ entry.date|date('j') }}. {{ monthShort }} {{ entry.date|date('y') }}
{{ entry.project.client.name }}
{{ entry.project.name }}
{{ service ? service.name : '' }}
{{ userMap[entry.userId] ?? ('User #' ~ entry.userId) }}
{{ entry.note }}
{{ entry.durationFormatted }}
{% if billable and hourlyRate is not null %} {{ (hourlyRate * entry.duration / 60)|number_format(2, ',', '.') }} € {% endif %}
{% if canEdit and not entry.invoiced %} {% endif %} {% if canEdit %} {% endif %}
{# ── Inline-Edit-Formular ───────────────────────────────── #} {% if canEdit and not entry.invoiced %} {% endif %}
{% else %}
{{ 'app.report.no_entries'|trans }}
{% endfor %} {# ── Pagination-Footer ─────────────────────────────────────────── #}
{{ 'app.report.show'|trans }} {% for l in validLimits %} {% if l == limit %} {{ l }} {% else %} {{ l }} {% endif %} {% endfor %} {{ 'app.report.of_total'|trans({'%count%': totalCount|number_format(0, ',', '.')}) }}
{{ totalDuration }} {{ totalRevenue|number_format(2, ',', '.') }} €
{# /.report-table #}
{# /.report-card #}
{# /.report-content #}
{# /.report-page #} {% endblock %}