mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Building report from issue #386
This commit is contained in:
@@ -113,6 +113,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# same thing but for categories #}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding table-responsive loading" id="categoryPeriodReport">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/lib/bootstrap-sortable.js"></script>
|
||||
@@ -135,6 +148,7 @@
|
||||
var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
|
||||
var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var categoryPeriodReportUri = '{{ route('reports.data.categoryPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="js/ff/reports/default/all.js"></script>
|
||||
|
||||
54
resources/views/reports/partials/category-period.twig
Normal file
54
resources/views/reports/partials/category-period.twig
Normal file
@@ -0,0 +1,54 @@
|
||||
<table class="table table-hover sortable">
|
||||
<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 income[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(income[category.id].entries[key]) %}
|
||||
<td data-value="{{ income[category.id].entries[key] }}">
|
||||
{{ income[category.id].entries[key]|formatAmount }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td data-value="0">
|
||||
{{ 0|formatAmount }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# expenses #}
|
||||
<td data-value="0">
|
||||
<!-- expense -->
|
||||
</td>
|
||||
{% endfor %}
|
||||
<td data-value="{{ info.sum }}">
|
||||
0
|
||||
</td>
|
||||
<td data-value="{{ info.sum }}">
|
||||
1
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user