Release 2.0.4 (#3883)
* fix column data truncated * calculate internal rate from user * show internal rate in timesheet listing * Fixed: responsivenss and size of report start page icons * fix: name display in dropdowns (and added tests) * translate reload button * fix invoice date might be in the past * fail safe customer name handling * translate invoice_date and invoice_date help * prevent URLs like start=null * prevent to reload select twice
This commit is contained in:
@@ -7,18 +7,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row row-cards">
|
||||
<div class="row row-deck row-cards">
|
||||
|
||||
{% for report in reports %}
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-body p-4 text-center">
|
||||
<span class="avatar avatar-xl mb-3 avatar-rounded"><i class="{{ report.reportIcon|icon(false, report.reportIcon) }}" style="color: {{ null|colorize(report.reportIcon) }}"></i></span>
|
||||
<div class="col-md-6 col-lg-4 col-xxl-3">
|
||||
<a class="card card-link" href="{{ path(report.route) }}">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<span class="avatar"><i class="icon {{ report.reportIcon|icon(false, report.reportIcon) }}" style="color: {{ null|colorize(report.reportIcon) }}"></i></span>
|
||||
</div>
|
||||
<div class="col p-2">{{ report.label|trans({}, 'reporting') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<a href="{{ path(report.route) }}" class="card-btn">{{ report.label|trans({}, 'reporting') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
{% set day = null %}
|
||||
{% set dayDuration = 0 %}
|
||||
{% set dayRate = {} %}
|
||||
{% set dayInternalRate = {} %}
|
||||
{% set dayHourlyRate = 0 %}
|
||||
{% set lastEntry = null %}
|
||||
|
||||
@@ -22,10 +23,11 @@
|
||||
{% set day = entry.begin|date_short %}
|
||||
{% endif %}
|
||||
{%- if showSummary and day is not same as(entry.begin|date_short) -%}
|
||||
{{ _self.summary(day, dayDuration, dayHourlyRate, dayRate, sortedColumns, dataTable) }}
|
||||
{{ _self.summary(day, dayDuration, dayHourlyRate, dayInternalRate, dayRate, sortedColumns, dataTable) }}
|
||||
{% set day = entry.begin|date_short %}
|
||||
{% set dayDuration = 0 %}
|
||||
{% set dayRate = {} %}
|
||||
{% set dayInternalRate = {} %}
|
||||
{% set dayHourlyRate = 0 %}
|
||||
{%- endif -%}
|
||||
{%- set customerCurrency = entry.project.customer.currency -%}
|
||||
@@ -41,7 +43,11 @@
|
||||
{% if dayRate[customerCurrency] is not defined %}
|
||||
{% set dayRate = dayRate|merge({(customerCurrency): 0}) %}
|
||||
{% endif %}
|
||||
{% if dayInternalRate[customerCurrency] is not defined %}
|
||||
{% set dayInternalRate = dayInternalRate|merge({(customerCurrency): 0}) %}
|
||||
{% endif %}
|
||||
{% set dayRate = dayRate|merge({(customerCurrency): dayRate[customerCurrency] + entry.rate}) %}
|
||||
{% set dayInternalRate = dayInternalRate|merge({(customerCurrency): dayInternalRate[customerCurrency] + entry.internalRate}) %}
|
||||
{%- endif -%}
|
||||
{% if dayHourlyRate is not null %}
|
||||
{% if dayHourlyRate == 0 %}
|
||||
@@ -54,7 +60,7 @@
|
||||
{% set lastEntry = entry %}
|
||||
{% endfor %}
|
||||
{% if showSummary %}
|
||||
{{ _self.summary(day, dayDuration, dayHourlyRate, dayRate, sortedColumns, dataTable) }}
|
||||
{{ _self.summary(day, dayDuration, dayHourlyRate, dayInternalRate, dayRate, sortedColumns, dataTable) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -107,11 +113,17 @@
|
||||
{% elseif column == 'hourlyRate' %}
|
||||
{{ entryHourlyRate }}
|
||||
{% elseif column == 'rate' %}
|
||||
{% if not entry.end or not is_granted('view_rate', entry) %}
|
||||
{% if not entry.end or not view_rate %}
|
||||
‐
|
||||
{% else %}
|
||||
{{ entry.rate|money(customerCurrency) }}
|
||||
{% endif %}
|
||||
{% elseif column == 'internalRate' %}
|
||||
{% if not entry.end or not view_rate %}
|
||||
‐
|
||||
{% else %}
|
||||
{{ entry.internalRate|money(customerCurrency) }}
|
||||
{% endif %}
|
||||
{% elseif column == 'customer' %}
|
||||
{{ widgets.label_customer(entry.project.customer) }}
|
||||
{% elseif column == 'project' %}
|
||||
@@ -143,7 +155,7 @@
|
||||
</td>
|
||||
{% endblock %}
|
||||
|
||||
{% macro summary(day, duration, dayHourlyRate, dayRates, sortedColumns, dataTable) %}
|
||||
{% macro summary(day, duration, dayHourlyRate, dayInternalRates, dayRates, sortedColumns, dataTable) %}
|
||||
{% import "macros/datatables.html.twig" as tables %}
|
||||
<tr class="summary info">
|
||||
{% for column, data in sortedColumns %}
|
||||
@@ -163,6 +175,13 @@
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% elseif column == 'internalRate' %}
|
||||
{% for currency, rate in dayInternalRates %}
|
||||
{{ rate|money(currency) }}
|
||||
{% if not loop.last %}
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user