{% set showUserColumn = showUserColumn ?? true %} {% set showInternalRate = showInternalRate ?? false %} {% set showRateColumn = showRateColumn ?? is_granted('view_rate_other_timesheet') %} {% set showRateBudget = showRateBudget ?? false %} {% set showTimeBudget = showTimeBudget ?? false %} {% set showTotalSummary = showTotalSummary ?? true %} {% set now = create_date('now', app.user) %} {% set decimal = decimal ?? false %} {# this is only triggered, if a user exports from his personal timesheet screen #} {% if query.user is not null %} {% set showUserColumn = false %} {# if exporting via the admin screen, users without view_rate_own_timesheet might still see their own rates #} {% set showRateColumn = is_granted('view_rate_own_timesheet') %} {% endif %}
{% block styles %} {% endblock %} {% block pdf_footer %} {% endblock %} {% block summary %}{{ 'export.period'|trans }}: {{ query.begin|date_short }} - {{ query.end|date_short }}
{{ 'label.customer'|trans }} | {{ 'label.project'|trans }} | {% if showTimeBudget %}{{ 'label.timeBudget'|trans }} | {% endif %} {% if showRateBudget %}{{ 'label.budget'|trans }} | {% endif %}{{ 'label.duration'|trans }} | {% if showRateColumn %} {% if showInternalRate %}{{ 'label.rate_internal'|trans }} | {% endif %}{{ 'label.rate'|trans }} | {% endif %}
---|---|---|---|---|---|---|
{% if showTimeBudget %} | {% endif %} {% if showRateBudget %} | {% endif %} | {{ customerDuration|duration(decimal) }} | {% if showRateColumn %} {% if showInternalRate %}{{ customerInternalRate|money(customerCurrency) }} | {% endif %}{{ customerRate|money(customerCurrency) }} | {% endif %}|
{{ summary.customer }} | {{ summary.project }} | {% if showTimeBudget %}{% if budgets[id] is defined and budgets[id].time_left > 0 %} {{ budgets[id].time_left|duration(decimal) }} {% endif %} | {% endif %} {% if showRateBudget %}{% if budgets[id] is defined and budgets[id].money_left > 0 %} {{ budgets[id].money_left|money(summary.currency) }} {% endif %} | {% endif %}{{ summary.duration|duration(decimal) }} | {% if showRateColumn %} {% if showInternalRate %}{{ summary.rate_internal|money(summary.currency) }} | {% endif %}{{ summary.rate|money(summary.currency) }} | {% endif %}
{% if showTimeBudget %} | {% endif %} {% if showRateBudget %} | {% endif %} | {{ customerDuration|duration(decimal) }} | {% if showRateColumn %} {% if showInternalRate %}{{ customerInternalRate|money(customerCurrency) }} | {% endif %}{{ customerRate|money(customerCurrency) }} | {% endif %}|
{{ 'sum.total'|trans }} | {% if showTimeBudget %}{% endif %} {% if showRateBudget %} | {% endif %} | {{ totalDuration|duration(decimal) }} | {% if showRateColumn %} {% if showInternalRate %}{{ totalInternalRate|money(customerCurrency) }} | {% endif %}{{ totalRate|money(customerCurrency) }} | {% endif %}
{{ 'label.date'|trans }} | {% if showUserColumn %}{{ 'label.user'|trans }} | {% endif %}{{ 'label.description'|trans }} | {{ 'label.duration'|trans }} | {% if showRateColumn %} {% if showInternalRate %}{{ 'label.rate_internal'|trans }} | {% endif %}{{ 'label.rate'|trans }} | {% endif %}||
---|---|---|---|---|---|---|---|
{{ entry.begin|date_time }}
{% if entry.end %}
{{ entry.end|date_time }} {% endif %} |
{% if showUserColumn %}
{{ entry.user.displayName }} | {% endif %}
{{ entry.project.customer.name }} - {{ entry.project.name }}{% if entry.activity is not null %} - {{ entry.activity.name }}{% endif %}
{% if entry.description is not empty %}
{{ entry.description|desc2html }} {% endif %} |
{{ entry.duration|duration(decimal) }} | {% if showRateColumn %} {# no check for is_granted('view_rate', entry) because it is only available for timesheets, but maybe missing for other potential export repositories #} {% set rate = rate + entry.rate %} {% set rateInternal = rateInternal + entry.internalRate %} {% set entryRate = entry.rate|money(entry.project.customer.currency) %} {% set entryRateInternal = entry.internalRate|money(entry.project.customer.currency) %} {% if showInternalRate %}{{ entryRateInternal }} | {% endif %}{{ entryRate }} | {% endif %}||
{% else %} | {% endif %} | {{ duration|duration(decimal) }} | {% if showRateColumn %} {% if showInternalRate %}{% if currency is not null %}{{ rateInternal|money(currency) }}{% endif %} | {% endif %}{% if currency is not null %}{{ rate|money(currency) }}{% endif %} | {% endif %}