mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-14 01:13:37 -06:00
60 lines
2.3 KiB
Twig
60 lines
2.3 KiB
Twig
<table class="table table-hover sortable table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="2" data-defaultsort="disabled">{{ 'category'|_ }}</th>
|
|
{% for period in periods %}
|
|
<th colspan="2" data-defaultsort="disabled">{{ period }}</th>
|
|
{% endfor %}
|
|
<th colspan="2" data-defaultsort="disabled">{{ 'sum'|_ }}</th>
|
|
</tr>
|
|
<tr>
|
|
{% for period in periods %}
|
|
<th data-defaultsign="_19">In</th>
|
|
<th data-defaultsign="_19">Out</th>
|
|
{% endfor %}
|
|
<th data-defaultsign="_19">In</th>
|
|
<th data-defaultsign="_19">Out</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for category in categories %}
|
|
{% if report.income[category.id] or report.expense[category.id] %}
|
|
<tr>
|
|
<td data-value="{{ category.name }}">
|
|
<a title="{{ category.name }}" href="#" data-category="{{ category.id }}" class="category-chart-activate">{{ category.name }}</a>
|
|
</td>
|
|
|
|
{% for key, period in periods %}
|
|
{# income first #}
|
|
{% if(report.income[category.id].entries[key]) %}
|
|
<td data-value="{{ report.income[category.id].entries[key] }}">
|
|
{{ report.income[category.id].entries[key]|formatAmount }}
|
|
</td>
|
|
{% else %}
|
|
<td data-value="0">
|
|
{{ 0|formatAmount }}
|
|
</td>
|
|
{% endif %}
|
|
|
|
{# expenses #}
|
|
{% if(report.expense[category.id].entries[key]) %}
|
|
<td data-value="{{ report.expense[category.id].entries[key] }}">
|
|
{{ report.expense[category.id].entries[key]|formatAmount }}
|
|
</td>
|
|
{% else %}
|
|
<td data-value="0">
|
|
{{ 0|formatAmount }}
|
|
</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<td data-value="{{ report.income[category.id].sum }}">
|
|
{{ report.income[category.id].sum|formatAmount }}
|
|
</td>
|
|
<td data-value="{{ report.expense[category.id].sum }}">
|
|
{{ report.expense[category.id].sum|formatAmount }}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table> |