diff --git a/README.md b/README.md index 7da7eb45..855b7c27 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ with most advanced features from Kimai 1 and many new ones, including but not li JSON API, invoicing, data exports, multi-timer and punch-in punch-out mode, tagging, multi-user and multi-timezones, authentication via SAML/LDAP/Database, customizable role permissions, responsive and ready for your mobile device, -hourly and fixed rates, advanced filtering, money and time budgets with report, support for plugins and many more. +user specific rates, advanced search & filtering, money and time budgets with report, support for plugins and many more. ## Installation @@ -61,9 +61,10 @@ It is open for changes and input from the community, your [ideas and questions]( > Kimai 2 uses a rolling release concept for delivering updates. > You can upgrade Kimai at any time , you don't need to wait for the next official release. -Release versions will be created on a regular base (approx. one release per month) and you can should use these tags if you are not familiar with git. +Release versions will be created on a regular base (approx. one release per month) and you should use these tags if you are not familiar with git. Every code change, whether it's a new feature or a bug fix, will be done on the master branch. -I have to do it this way, as I develop Kimai in my free time and want to put my effort into the software instead of backporting changes for old versions. +I develop Kimai in my free time and want to put my effort into the software instead of backporting changes for old versions. +The only exception is a critical security issue, which I would fix in the last version as well. ## Credits diff --git a/UPGRADING.md b/UPGRADING.md index 02f2cc19..113c3d6a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -10,6 +10,7 @@ Perform EACH version specific task between your version and the new one, otherwi ## [1.8](https://github.com/kevinpapst/kimai2/releases/tag/1.8) +- New PHP requirement: `ext-xsl` should be pre-installed in most environments when `ext-xml` is loaded - New mailer library: check if emails are still working (eg. by using the "password forgotten" function) or if you need to adjust your configuration, [see docs at symfony.com](https://symfony.com/doc/current/components/mailer.html#transport) - Support for line breaks in multiline invoice fields for spreadsheets (check your invoice templates after the update) diff --git a/templates/export/index.html.twig b/templates/export/index.html.twig index 0be8b59b..ca4b4d6d 100644 --- a/templates/export/index.html.twig +++ b/templates/export/index.html.twig @@ -59,17 +59,23 @@ {{ widgets.callout('warning', 'error.no_entries_found') }} {% else %} {{ tables.datatable_header(tableName, columns, query, {}) }} + {% set totalAmount = {} %} + {% set totalDuration = 0 %} {% for entry in entries %} {% set currency = entry.project.customer.currency %} {% set duration = entry.duration|duration %} + {% if totalAmount[currency] is not defined %} + {% set totalAmount = totalAmount|merge({(currency): 0}) %} + {% endif %} {% if entry.fixedRate is not null %} {% set rate = entry.fixedRate %} {% set duration = 1 %} - {% elseif entry.hourlyRate is not null %} - {% set rate = entry.hourlyRate %} + {% set totalDuration = totalDuration + 1 %} {% else %} - {% set rate = entry.user.preferenceValue('hourly_rate') %} + {% set rate = entry.hourlyRate %} + {% set totalDuration = totalDuration + entry.duration %} {% endif %} + {% set totalAmount = totalAmount|merge({(currency): totalAmount[currency] + entry.rate}) %} {{ entry.begin|date_short }} {{ widgets.label_user(entry.user) }} @@ -114,6 +120,17 @@ {% endfor %} + + + {{ totalDuration|duration }} + + {% for currency, amount in totalAmount %} + {{ amount|money(currency) }} + {% if not loop.last %}
{% endif %} + {% endfor %} + + + {{ tables.data_table_footer(entries) }} {% endif %} {% endif %} diff --git a/tests/Controller/ExportControllerTest.php b/tests/Controller/ExportControllerTest.php index bc7c60ac..d6082bbb 100644 --- a/tests/Controller/ExportControllerTest.php +++ b/tests/Controller/ExportControllerTest.php @@ -84,7 +84,8 @@ class ExportControllerTest extends ControllerBaseTest // make sure all existing records are displayed $this->assertHasDataTable($client); - $this->assertDataTableRowCount($client, 'datatable_export', 22); + // +1 row for summary + $this->assertDataTableRowCount($client, 'datatable_export', 23); // assert export type buttons are available $expected = ['csv', 'html', 'pdf', 'xlsx']; @@ -135,7 +136,8 @@ class ExportControllerTest extends ControllerBaseTest // make sure all existing records are displayed $this->assertHasDataTable($client); - $this->assertDataTableRowCount($client, 'datatable_export', 2); + // +1 row for summary + $this->assertDataTableRowCount($client, 'datatable_export', 3); // assert export type buttons are available $expected = ['csv', 'html', 'pdf', 'xlsx'];