resources/views/templates/reports/project_report.html
{% if projects|e %} {% for project in projects %}
{% if project.tasks is not empty %}
| {{ t('date') }} | {{ t('description') }} | {{ t('duration') }} |
|---|---|---|
| {% for task in project.tasks %} {% for log in task.time_log%} | {{ log.start_date }} |
| {{ log.duration|date('h:i:s')}} | {% endfor %} {% endfor %} {% endif %} {% if project.invoices %}
| {{ t('date')}} | {{ t('invoice_number')}} | {{ t('amount') }} | {{ t('balance') }} |
|---|---|---|---|
| {% set total_amount = 0 %} {% set total_balance = 0 %} {% for invoice in project.invoices %} | {{ invoice.date }} | {{ invoice.number }} | {{ invoice.amount }} |
| {% set total_amount = total_amount + invoice.amount_raw %} {% set total_balance = total_balance + invoice.balance_raw %} {% endfor%} | {{ total_amount |
{% endif %} {% if project.expenses %}
| {{ t('date')}} | {{ t('number')}} | {{ t('amount') }} |
|---|---|---|
| {% set total_expense_amount = 0 %} {% for expense in project.expenses %} | {{ expense.date }} | {{ expense.number }} |
| {% set total_expense_amount = total_expense_amount + expense.amount_raw %} {% endfor%} |
{% endif %}
| {{ t('summary') }} | {{ t('amount') }} |
|---|---|
| {{ t('project_value') }} | {{ (project.budgeted_hours * project.task_rate_raw) |
| {{ t('invoice_task_hours') }} | {{ (project.current_hours * project.task_rate_raw) |
| {{ t('invoiced') }} | {{ total_amount |
| {{ t('expenses') }} | {{ total_expense_amount |
| {{ t('profit') }} | {{ (total_amount - total_expense_amount) |
{% endfor %} {% endif %}