show total hourly rate in detail pages (#3441)
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
{% if is_granted('time', entity) %}
|
{% set timeBudgetVisible = is_granted('time', entity) %}
|
||||||
|
{% set durationTrans = entity.isMonthlyBudget() ? 'stats.durationMonth' : 'stats.durationTotal' %}
|
||||||
|
{% if timeBudgetVisible %}
|
||||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||||
{% import "macros/progressbar.html.twig" as progress %}
|
{% import "macros/progressbar.html.twig" as progress %}
|
||||||
{% import "macros/widgets.html.twig" as widgets %}
|
{% import "macros/widgets.html.twig" as widgets %}
|
||||||
@@ -8,7 +10,6 @@
|
|||||||
{% block box_body_class %}no-padding{% endblock %}
|
{% block box_body_class %}no-padding{% endblock %}
|
||||||
{% block box_attributes %}id="time_budget_box"{% endblock %}
|
{% block box_attributes %}id="time_budget_box"{% endblock %}
|
||||||
{% block box_body %}
|
{% block box_body %}
|
||||||
{% set durationTrans = entity.isMonthlyBudget() ? 'stats.durationMonth' : 'stats.durationTotal' %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-5">
|
<div class="col-xs-12 col-sm-5">
|
||||||
<table class="table table-hover dataTable">
|
<table class="table table-hover dataTable">
|
||||||
@@ -130,6 +131,14 @@
|
|||||||
<td class="text-nowrap text-right">{{ stats.internalRate|money(currency) }}</td>
|
<td class="text-nowrap text-right">{{ stats.internalRate|money(currency) }}</td>
|
||||||
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% if not entity.isMonthlyBudget() and timeBudgetVisible and stats.duration > 0 %}
|
||||||
|
{% set realHourlyRate = stats.rateBillable / stats.duration|chart_duration %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ 'label.hourlyRate'|trans }} ({{ 'label.billable'|trans }} / {{ durationTrans|trans }})</td>
|
||||||
|
<td class="text-nowrap text-right">{{ realHourlyRate|money(currency) }}</td>
|
||||||
|
<td class="text-nowrap text-right">-</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% if entity.budget > 0 %}
|
{% if entity.budget > 0 %}
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3" class="text-nowrap text-right">
|
<th colspan="3" class="text-nowrap text-right">
|
||||||
|
|||||||
Reference in New Issue
Block a user