{{ 'customer'|trans }}
{{ widgets.label_customer(project.customer) }}
{{ 'project'|trans }}
{{ widgets.label_project(project) }}
{{ 'stats.durationTotal'|trans }}
{{ project_view.durationTotal|duration }}
{% if view_revenue %}
{{ 'stats.amountTotal'|trans }}
{{ project_view.rateTotal|money(currency) }}
{{ 'billable'|trans }}
{{ project_view.billableRate|money(currency) }}
{% endif %}
{{ 'last_record'|trans }}
{% if project_view.lastRecord is not null %}
{{ project_view.lastRecord|date_short }}
{% else %}
–
{% endif %}
{% if is_granted('create_export') %}
{{ 'not_exported'|trans }}
{% endif %}
{% if is_granted('view_invoice') %}
{{ 'not_invoiced'|trans }}
{% endif %}
{% if (showMoneyBudget and project.hasBudget()) or (showTimeBudget and project.hasTimeBudget()) %}
{% from "project/charts.html.twig" import project_budget %}
{{ project_budget(project, project_details, chartPrefix) }}
{% endif %}
{% if (showMoneyBudget and project.hasBudget()) or (showTimeBudget and project.hasTimeBudget()) %}
{% set budgetStats = project_details.budgetStatisticModel %}
{% if showTimeBudget and project.hasTimeBudget() %}
{{ 'timeBudget'|trans }}
{% if budgetStats.isMonthlyBudget() %}
({{ 'budgetType_month'|trans }})
{% endif %}
|
{{ progress.progressbar_timebudget(budgetStats) }}
|
{% endif %}
{% if showMoneyBudget and project.hasBudget() %}
{{ 'budget'|trans }}
{% if budgetStats.isMonthlyBudget() %}
({{ 'budgetType_month'|trans }})
{% endif %}
|
{{ progress.progressbar_budget(budgetStats, project.customer.currency) }}
|
{% endif %}
{% endif %}
{% if showTotalDurationChart %}
{{ charts.bar_chart(chartPrefix ~ 'Duration', labels, [durations], {'height': '300px', 'renderEvent': 'render.' ~ chartPrefix ~ 'Duration'}) }}
{% if showTotalRevenueChart %}
{{ charts.bar_chart(chartPrefix ~ 'Rate', labels, [rates], {'height': '300px', 'renderEvent': 'render.' ~ chartPrefix ~ 'Rate'}) }}
{% endif %}
{% endif %}
{% if activities is not empty %}
{{ _self.activity_tab(activities, project_view.durationTotal, project.customer.currency, chartPrefix, view_revenue) }}
{% endif %}
{% if see_users and project_details.userStats|length > 0 %}
|
{{ 'duration'|trans }} |
{% if view_revenue %}
{{ 'billable'|trans }} |
{{ 'stats.amountTotal'|trans }} |
{% endif %}
|
{% set rateTotal = 0 %}
{% set rateTotalBillable = 0 %}
{% set totalDuration = 0 %}
{% set datasets = [] %}
{% set labels = [] %}
{% for userStat in project_details.userStats|sort((a, b) => b.duration <=> a.duration) %}
{% set user = userStat.user %}
{% set color = user.color|colorize(user.displayName) %}
{% set rateTotal = rateTotal + userStat.rate %}
{% set rateTotalBillable = rateTotalBillable + userStat.rateBillable %}
{% set totalDuration = totalDuration + userStat.duration %}
{% set datasets = datasets|merge([{'name': user.displayName, 'duration': userStat.duration|duration, 'value': userStat.duration, 'color': color, 'rate': userStat.rate|money(currency)}]) %}
{% set percentage = 0 %}
{% if project_view.durationTotal > 0 and userStat.duration > 0 %}
{% set percentage = (100 / (project_view.durationTotal / userStat.duration)) %}
{% endif %}
{{ widgets.label_dot(user.displayName, user.color) }}
|
{{ userStat.duration|duration }}
|
{% if view_revenue %}
{{ userStat.rateBillable|money(currency) }}
|
{{ userStat.rate|money(currency) }}
|
{% endif %}
{{ percentage|number_format(1) }} %
|
{% endfor %}
|
{{ totalDuration|duration }} |
{% if view_revenue %}
{{ rateTotalBillable|money(currency) }} |
{{ rateTotal|money(currency) }} |
{% endif %}
|
{% set chartOptions = {'height': (datasets|length > 12 ? '600px' : '300px'), 'renderEvent': 'render.' ~ chartPrefix ~ 'User'} %}
{{ charts.doughnut_chart(chartPrefix ~ 'User', labels, datasets, chartOptions) }}
{% endif %}