Release 2.0.27 (#4107)
This commit is contained in:
@@ -130,12 +130,28 @@
|
||||
<td class="text-nowrap text-end">{{ percentReached|number_format(2) }}%</td>
|
||||
</tr>
|
||||
{% if not entity.isMonthlyBudget() and timeBudgetVisible and stats.duration > 0 and stats.duration|chart_duration > 0.00 %}
|
||||
{% if stats.internalRate > 0 %}
|
||||
{% set revenueTotal = stats.rateBillable - stats.internalRate %}
|
||||
<tr>
|
||||
<td>{{ 'stats.revenue'|trans }} ({{ 'billable'|trans }} - {{ 'internalRate'|trans }})</td>
|
||||
<td class="text-nowrap text-end">{{ revenueTotal|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">-</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% set realHourlyRate = stats.rateBillable / stats.duration|chart_duration %}
|
||||
<tr>
|
||||
<td>{{ 'hourlyRate'|trans }} ({{ 'billable'|trans }} / {{ durationTrans|trans }})</td>
|
||||
<td class="text-nowrap text-end">{{ realHourlyRate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">-</td>
|
||||
</tr>
|
||||
{% if stats.internalRate > 0 %}
|
||||
{% set revenueHourlyRate = revenueTotal / stats.duration|chart_duration %}
|
||||
<tr>
|
||||
<td>{{ 'hourlyRate'|trans }} ({{ 'stats.revenue'|trans }} / {{ durationTrans|trans }})</td>
|
||||
<td class="text-nowrap text-end">{{ revenueHourlyRate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">-</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if entity.budget > 0 %}
|
||||
<tr>
|
||||
|
||||
35
templates/embeds/datatable.html.twig
Normal file
35
templates/embeds/datatable.html.twig
Normal file
@@ -0,0 +1,35 @@
|
||||
{% import "macros/datatables.html.twig" as tables %}
|
||||
{% from "macros/widgets.html.twig" import nothing_found %}
|
||||
|
||||
{% if not dataTable.hasResults() %}
|
||||
{{ nothing_found(dataTable.getReloadEvents()) }}
|
||||
{% else %}
|
||||
{% block datatable_header %}
|
||||
{{ tables.header(dataTable) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block datatable_before %}{% endblock %}
|
||||
|
||||
{% set sortedColumns = dataTable.sortedColumnNames %}
|
||||
{% block datatable_outer %}
|
||||
{% for entry in dataTable %}
|
||||
{% block datatable_row %}
|
||||
<tr{% block datatable_row_attr %}{% endblock %}>
|
||||
{% for column, data in sortedColumns %}
|
||||
{% block datatable_column %}
|
||||
<td class="{{ tables.class(dataTable, column) }}"{% block datatable_column_attr %}{% endblock %}>
|
||||
{% block datatable_column_value %}{{ column }}{% endblock %}
|
||||
</td>
|
||||
{% endblock %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endblock %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block datatable_after %}{% endblock %}
|
||||
|
||||
{% block datatable_footer %}
|
||||
{{ tables.footer(dataTable) }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user