{% extends 'export/layout.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% import "macros/webloader.html.twig" as webloader %} {% block document_title %}{{ 'export'|trans }}{% endblock %} {% set storageItemName = 'kimai_html_export' %} {% set decimal = decimal|default(false) %} {% set columnTitles = {} %} {% set columns = { 'date': true, 'begin': false, 'end': false, 'username': false, 'customer': true, 'project': true, 'activity': true, 'description': false, 'exported': false, 'tags': false, } %} {% for id, field in timesheetMetaFields %} {% set columns = columns|merge({ ('t_' ~ field.name): true}) %} {% set columnTitles = columnTitles|merge({ ('t_' ~ field.name): (field.label)}) %} {% endfor %} {% for id, field in customerMetaFields %} {% set columns = columns|merge({ ('c_' ~ field.name): true}) %} {% set columnTitles = columnTitles|merge({ ('c_' ~ field.name): (field.label)}) %} {% endfor %} {% for id, field in projectMetaFields %} {% set columns = columns|merge({ ('p_' ~ field.name): true}) %} {% set columnTitles = columnTitles|merge({ ('p_' ~ field.name): (field.label)}) %} {% endfor %} {% for id, field in activityMetaFields %} {% set columns = columns|merge({ ('a_' ~ field.name): true}) %} {% set columnTitles = columnTitles|merge({ ('a_' ~ field.name): (field.label)}) %} {% endfor %} {% for id, field in userPreferences %} {% set columns = columns|merge({ ('u_' ~ field.name): true}) %} {% set columnTitles = columnTitles|merge({ ('u_' ~ field.name): (field.label)}) %} {% endfor %} {% set columns = columns|merge({ 'hourlyRate': false, 'fixedRate': false, 'duration': 'duration', 'internalRate': 'internalRate', 'rate': 'rate', }) %} {% block javascripts %} {{ webloader.init_frontend_loader() }} {% endblock %} {% block styles %} {% endblock %} {% block export %} {% set formItemClass = "d-inline-block w-auto text-nowrap me-2" %}
{{ 'export.period'|trans }}: {{ query.begin|date_short }} - {{ query.end|date_short }}
{{ 'customer'|trans }} | {{ 'project'|trans }} | {{ 'timeBudget'|trans }} | {{ 'budget'|trans }} | {{ 'duration'|trans }} | {{ 'internalRate'|trans }} | {{ 'rate'|trans }} |
---|---|---|---|---|---|---|
{{ decimal ? durationDecimal : durationNormal }} | {{ customerInternalRate|money(customerCurrency) }} | {{ customerRate|money(customerCurrency) }} | ||||
{{ summary.customer }} | {{ summary.project }} | {% if budgets[id] is defined and budgets[id].time_left > 0 %} {% set durationNormal = budgets[id].time_left|duration(false) %} {% set durationDecimal = budgets[id].time_left|duration(true) %} {{ decimal ? durationDecimal : durationNormal }} {% endif %} | {% if budgets[id] is defined and budgets[id].money_left > 0 %} {{ budgets[id].money_left|money(summary.currency) }} {% endif %} | {% set durationNormal = summary.duration|duration(false) %} {% set durationDecimal = summary.duration|duration(true) %} {{ decimal ? durationDecimal : durationNormal }} | {{ summary.rate_internal|money(summary.currency) }} | {{ summary.rate|money(summary.currency) }} |
{{ decimal ? durationDecimal : durationNormal }} | {{ customerInternalRate|money(customerCurrency) }} | {{ customerRate|money(customerCurrency) }} |
{{ columnTitles[columnId]|default(columnId)|trans }} | {% endfor %}|||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ entry.begin|date_time }} | {{ entry.begin|date_format('H:i') }} | {{ entry.end|date_format('H:i') }} | {{ widgets.username(entry.user) }} | {{ 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 %} | {% if entry.exported %} {{ 'entryState.exported'|trans }} {% else %} {{ 'entryState.not_exported'|trans }} {% endif %} | {% if entry.tags is defined and entry.tags is not empty %} {{ entry.tagsAsArray|join(', ') }} {% endif %} | {% for id, field in timesheetMetaFields %}{{ tables.datatable_meta_column(entry, field) }} | {% endfor %} {% for id, field in customerMetaFields %}{{ tables.datatable_meta_column(entry.project.customer, field) }} | {% endfor %} {% for id, field in projectMetaFields %}{{ tables.datatable_meta_column(entry.project, field) }} | {% endfor %} {% for id, field in activityMetaFields %}{% if entry.activity is not null %} {{ tables.datatable_meta_column(entry.activity, field) }} {% endif %} | {% endfor %} {% for id, field in userPreferences %}{% set metaField = entry.user.preference(field.name) %} {% if not metaField is null and metaField.value is not null and metaField.value is not empty %} {{ widgets.form_type_value(field.type, metaField.value, entry.user) }} {% endif %} | {% endfor %}{{ entry.hourlyRate|money(entry.project.customer.currency) }} | {{ entry.fixedRate|money(entry.project.customer.currency) }} | {% set durationNormal = entry.duration|duration(false) %} {% set durationDecimal = entry.duration|duration(true) %} {{ decimal ? durationDecimal : durationNormal }} | {% if entry.internalRate is defined %} {{ entry.internalRate|money(entry.project.customer.currency) }} {% else %} {{ entry.rate|money(entry.project.customer.currency) }} {% endif %} | {{ entry.rate|money(entry.project.customer.currency) }} |
{% endif %} {% endfor %} | {% set durationNormal = timeWorked|duration(false) %} {% set durationDecimal = timeWorked|duration(true) %} {{ decimal ? durationDecimal : durationNormal }} | {%- if currency is not null and currency is not same as(false) %} {{ rateInternalTotal|money(currency) }} {% else %} {{ rateInternalTotal|money }} {% endif -%} | {%- if currency is not null and currency is not same as(false) %} {{ rateTotal|money(currency) }} {% else %} {{ rateTotal|money }} {% endif -%} |