option to use decimal format in user timesheet export (#1489)

This commit is contained in:
Kevin Papst
2020-02-24 18:03:30 +01:00
committed by GitHub
parent 0e507804b1
commit 34d2228d5d
13 changed files with 84 additions and 25 deletions

View File

@@ -40,7 +40,7 @@
{% endif %}
{% if is_granted('duplicate', timesheet) %}
{% set actions = actions|merge({'copy': {'url': path('duplicate_timesheet', {'id' : timesheet.id}), 'class': 'api-link', 'attr': {'data-payload': '{"copy": "all"}', 'data-event': 'kimai.timesheetStart kimai.timesheetUpdate', 'data-method': 'PATCH', 'data-msg-error': 'timesheet.update.error', 'data-msg-success': 'timesheet.update.success'}}}) %}
{% set actions = actions|merge({'copy': {'url': path('duplicate_timesheet', {'id' : timesheet.id}), 'class': 'api-link', 'attr': {'data-payload': '{"copy": "all"}', 'data-event': 'kimai.timesheetStart kimai.timesheetUpdate', 'data-method': 'PATCH', 'data-msg-error': 'action.update.error', 'data-msg-success': 'action.update.success'}}}) %}
{% endif %}
{% if is_granted('edit', timesheet) %}

View File

@@ -4,6 +4,7 @@
{% block title %}{{ 'menu.export'|trans }}{% endblock %}
{% block invoice %}
{% set decimal = decimal|default(false) %}
{% set showUserColumn = true %}
{% if query.user %}
{% set showUserColumn = false %}
@@ -72,7 +73,7 @@
{% for field in metaColumns %}
<td>{{ tables.datatable_meta_column(entry, field) }}</td>
{% endfor %}
<td class="text-nowrap">{{ entry.duration|duration }}</td>
<td class="text-nowrap">{{ entry.duration|duration(decimal) }}</td>
</tr>
{% endfor %}
</tbody>
@@ -86,7 +87,7 @@
<th></th>
{% endfor %}
<th>{{ 'invoice.total_working_time'|trans }}</th>
<th class="text-nowrap">{{ timeWorked|duration }}</th>
<th class="text-nowrap">{{ timeWorked|duration(decimal) }}</th>
</tr>
</tfoot>
</table>