Edit file File name : user_list_period_data.html.twig Content :{%- set absoluteDuration = 0 -%} {%- set absoluteInternalRate = 0 -%} {%- set absoluteRate = 0 -%} {%- set totalsDuration = {} -%} {%- set totalsInternalRate = {} -%} {%- set totalsRate = {} -%} {% if dataType == 'rate' %} {% set dataTypeTitle = 'stats.amountTotal' %} {% elseif dataType == 'internalRate' %} {% set dataTypeTitle = 'label.rate_internal' %} {% else %} {% set dataTypeTitle = 'stats.durationTotal' %} {% endif %} <table class="table table-bordered table-hover dataTable"> <thead> <tr> <th> </th> <th class="text-center reportDataTypeTitle">{{ dataTypeTitle|trans }}</th> {% for column in stats.0.getDateTimes() %} {% block period_name %}{% endblock %} {% set columnKey = column|report_date %} {% set totalsDuration = totalsDuration|merge({(columnKey): 0}) %} {% set totalsInternalRate = totalsInternalRate|merge({(columnKey): 0}) %} {% set totalsRate = totalsRate|merge({(columnKey): 0}) %} {% endfor %} </tr> </thead> <tbody> {% for userPeriod in stats|filter(row => row.user is not null)|sort((a,b) => a.user.displayName|lower <=> b.user.displayName|lower) %} {% set usersTotalDuration = 0 %} {% set usersTotalInternalRate = 0 %} {% set usersTotalRate = 0 %} <tr class="user"> <td class="text-nowrap"{% block user_column_cell_attribute %}{% endblock %}> {% block user_column %} {% from "macros/widgets.html.twig" import label_dot %} {{ label_dot(userPeriod.user.displayName, userPeriod.user.color) }} {% endblock %} </td> {% for period in attribute(userPeriod, period_attribute) %} {% if period.totalDuration > 0 %} {% set usersTotalDuration = usersTotalDuration + period.totalDuration %} {% set absoluteDuration = absoluteDuration + period.totalDuration %} {% endif %} {% if period.totalInternalRate > 0 %} {% set usersTotalInternalRate = usersTotalInternalRate + period.totalInternalRate %} {% set absoluteInternalRate = absoluteInternalRate + period.totalInternalRate %} {% endif %} {% if period.totalRate > 0 %} {% set usersTotalRate = usersTotalRate + period.totalRate %} {% set absoluteRate = absoluteRate + period.totalRate %} {% endif %} {% set reportDateKey = period.date|report_date %} {% set totalsDuration = totalsDuration|merge({(reportDateKey): (totalsDuration[reportDateKey] + period.totalDuration)}) %} {% set totalsInternalRate = totalsInternalRate|merge({(reportDateKey): (totalsInternalRate[reportDateKey] + period.totalInternalRate)}) %} {% set totalsRate = totalsRate|merge({(reportDateKey): (totalsRate[reportDateKey] + period.totalRate)}) %} {% endfor %} <th class="text-nowrap text-center total{% block user_total_cell_class %}{% endblock %}"{% block user_total_cell_attribute %}{% endblock %}> {% if dataType == 'rate' %} {% block total_rate_user %}{% endblock %} {% elseif dataType == 'internalRate' %} {% block total_internal_rate_user %}{% endblock %} {% else %} {% block total_duration_user %}{% endblock %} {% endif %} </th> {% for period in attribute(userPeriod, period_attribute) %} <td class="text-nowrap text-center day-total{% block period_cell_class %}{% endblock %}"{% block period_cell_attribute %}{% endblock %}> {% if period.totalDuration > 0 or period.totalRate > 0 or period.totalInternalRate > 0 %} {% if dataType == 'rate' %} {% block rate %}{% endblock %} {% elseif dataType == 'internalRate' %} {% block internal_rate %}{% endblock %} {% else %} {% block duration %}{% endblock %} {% endif %} {% endif %} </td> {% endfor %} </tr> {% endfor %} </tbody> <tfoot> <tr class="summary"> <td>{{ dataTypeTitle|trans }}</td> <td class="text-center text-nowrap{% block total_period_cell_class %}{% endblock %}"{% block total_period_cell_attribute %}{% endblock %}> {% if dataType == 'rate' %} {% block total_rate %} {{ absoluteRate|money }} {% endblock %} {% elseif dataType == 'internalRate' %} {% block total_internal_rate %} {{ absoluteInternalRate|money }} {% endblock %} {% else %} {% block total_duration %} {{ absoluteDuration|duration(decimal) }} {% endblock %} {% endif %} </td> {% if dataType == 'rate' %} {% for id, total in totalsRate %} <td class="text-center text-nowrap{% block total_rate_period_cell_class %}{% endblock %}"{% block total_rate_period_cell_attribute %}{% endblock %}> {% block total_rate_period %} {{ total|money }} {% endblock %} </td> {% endfor %} {% elseif dataType == 'internalRate' %} {% for id, total in totalsInternalRate %} <td class="text-center text-nowrap{% block total_internal_rate_period_cell_class %}{% endblock %}"{% block total_internal_rate_period_cell_attribute %}{% endblock %}> {% block total_internal_rate_period %} {{ total|money }} {% endblock %} </td> {% endfor %} {% else %} {% for id, total in totalsDuration %} <td class="text-center text-nowrap{% block total_duration_period_cell_class %}{% endblock %}"{% block total_duration_period_cell_attribute %}{% endblock %}> {% block total_duration_period %} {{ total|duration(decimal) }} {% endblock %} </td> {% endfor %} {% endif %} </tr> </tfoot> </table> Save