{% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/progressbar.html.twig" as progress %} {% block box_title %}{{ 'label.budget'|trans }}{% endblock %} {% block box_attributes %}id="budget_box"{% endblock %} {% block box_body %} {% set params = { '%project%': '' ~ project.name ~ '', '%customer%': '' ~ project.customer.name ~ '', '%records%': '' ~ stats.recordAmount ~ '', '%activities%': '' ~ stats.activityAmount ~ '', '%duration%': '' ~ stats.recordDuration|duration ~ '' } %} {% set currency = project.customer.currency %}
{{ 'admin_project.short_stats'|trans(params)|raw }} {{ 'label.rate_internal'|trans }}: {{ stats.recordInternalRate|money(currency) }}.
{{ progress.progressbar(project.budget, stats.recordRate, 'label.budget'|trans, stats.recordRate|money(currency) ~ ' / ' ~ project.budget|money(currency) ) }} {{ progress.progressbar(project.timeBudget, stats.recordDuration, 'label.timeBudget'|trans, stats.recordDuration|duration ~ ' / ' ~ project.timeBudget|duration ) }} {% endblock %} {% endembed %}