mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
First start making the category report also multi-currency
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<th data-defaultsort="disabled">{{ 'description'|_ }}</th>
|
||||
<th data-defaultsign="month">{{ 'date'|_ }}</th>
|
||||
<th data-defaultsign="az">{{ 'account'|_ }}</th>
|
||||
<th data-defaultsign="az">{{ 'budget'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'amount'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -28,6 +29,11 @@
|
||||
{{ row.destination_account_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td data-sortable="false">
|
||||
<a href="{{ route('budgets.show', row.budget_id) }}">
|
||||
{{ row.budget_name }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td data-value="{{ row.amount }}" style="text-align: right;">
|
||||
{{ formatAmountBySymbol(row.amount, row.currency_symbol, row.currency_decimal_places) }}
|
||||
|
@@ -1,434 +1,213 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, categoryIds, start, end) }}
|
||||
{#{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, budgetIds, start, end) }}#}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'accounts'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="az">{{ 'name'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'earned'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'spent'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in accounts %}
|
||||
<tr>
|
||||
<td data-value="{{ account.name }}">
|
||||
<a href="{{ route('accounts.show', account.id) }}"
|
||||
title="{{ account.name }}">{{ account.name }}</a>
|
||||
</td>
|
||||
{% if accountSummary[account.id] %}
|
||||
<td data-value="{{ accountSummary[account.id].earned }}"
|
||||
style="text-align: right;">{{ accountSummary[account.id].earned|formatAmount }}</td>
|
||||
{% else %}
|
||||
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
|
||||
{% endif %}
|
||||
{% if accountSummary[account.id] %}
|
||||
<td data-value="{{ accountSummary[account.id].spent }}"
|
||||
style="text-align: right;">{{ accountSummary[account.id].spent|formatAmount }}</td>
|
||||
{% else %}
|
||||
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td>{{ 'sum'|_ }}</td>
|
||||
<td style="text-align: right;">{{ accountSummary.sum.earned|formatAmount }}</td>
|
||||
<td style="text-align: right;">{{ accountSummary.sum.spent|formatAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="box-body table-responsive no-padding" id="accountsHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'categories'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="az">{{ 'name'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'earned'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'spent'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td data-value="{{ category.name }}">
|
||||
<a href="{{ route('categories.show', category.id) }}"
|
||||
title="{{ category.name }}">{{ category.name }}</a>
|
||||
</td>
|
||||
{% if categorySummary[category.id] %}
|
||||
<td data-value="{{ categorySummary[category.id].earned }}"
|
||||
style="text-align: right;">{{ categorySummary[category.id].earned|formatAmount }}</td>
|
||||
{% else %}
|
||||
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
|
||||
{% endif %}
|
||||
{% if categorySummary[category.id] %}
|
||||
<td data-value="{{ categorySummary[category.id].spent }}"
|
||||
style="text-align: right;">{{ categorySummary[category.id].spent|formatAmount }}</td>
|
||||
{% else %}
|
||||
<td data-value="0" style="text-align: right;">{{ 0|formatAmount }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td>{{ 'sum'|_ }}</td>
|
||||
<td style="text-align: right;">{{ categorySummary.sum.earned|formatAmount }}</td>
|
||||
<td style="text-align: right;">{{ categorySummary.sum.spent|formatAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="box-body table-responsive no-padding" id="categoriesHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if categories.count > 1 %}
|
||||
<div class="col-lg-2 col-md-3">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income_per_category'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="categories-in-pie-chart" style="margin:0 auto;" height="150" width="150"></canvas>
|
||||
<label style="font-weight:normal;">
|
||||
<input type="checkbox" id="categories-in-pie-chart-checked">
|
||||
<small>{{ 'include_income_not_in_category'|_ }}</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expense_per_category'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="categories-out-pie-chart" style="margin:0 auto;" height="150" width="150"></canvas>
|
||||
<label style="font-weight:normal;">
|
||||
<input type="checkbox" id="categories-out-pie-chart-checked">
|
||||
<small>{{ 'include_expense_not_in_category'|_ }}</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-lg-2 col-md-3" id="pieCharts">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income_per_account'|_ }}</h3>
|
||||
<h3 class="box-title">{{ 'account_per_category'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="accounts-in-pie-chart" style="margin:0 auto;" height="150" width="150"></canvas>
|
||||
<label style="font-weight:normal;">
|
||||
<input type="checkbox" id="accounts-in-pie-chart-checked">
|
||||
<small>{{ 'include_income_not_in_account'|_ }}</small>
|
||||
</label>
|
||||
<div class="box-body table-responsive no-padding" id="accountPerCategoryHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expense_per_account'|_ }}</h3>
|
||||
<h3 class="box-title">{{ 'expense_per_category'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="accounts-out-pie-chart" style="margin:0 auto;" height="150" width="150"></canvas>
|
||||
<label style="font-weight:normal;">
|
||||
<input type="checkbox" id="accounts-out-pie-chart-checked">
|
||||
<small>{{ 'include_expense_not_in_account'|_ }}</small>
|
||||
</label>
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="category-out-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box" id="incomeAndExpensesChart">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income_and_expenses'|_ }}</h3>
|
||||
<h3 class="box-title">{{ 'income_per_category'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<canvas id="in-out-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="category-in-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expense_per_budget'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="budgets-out-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
{% if averageExpenses|length > 0 %}
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'average_spending_per_account'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="az">{{ 'account'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'spent_average'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'total'|_ }}</th>
|
||||
<th data-defaultsign="_19">{{ 'transaction_count'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set totalCount = 0 %}
|
||||
{% set totalSum = 0 %}
|
||||
{% for row in averageExpenses %}
|
||||
{% if loop.index > listLength %}
|
||||
<tr class="overListLength">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
<td data-value="{{ row.name }}">
|
||||
<a href="{{ route('accounts.show', row.id) }}">{{ row.name }}</a>
|
||||
</td>
|
||||
<td data-value="{{ row.average }}" style="text-align: right;">
|
||||
{{ row.average|formatAmount }}
|
||||
</td>
|
||||
<td data-value="{{ row.sum }}" style="text-align: right;">
|
||||
{{ row.sum|formatAmount }}
|
||||
</td>
|
||||
<td data-value="{{ row.count }}">
|
||||
{{ row.count }}
|
||||
</td>
|
||||
</tr>
|
||||
{% set totalCount = totalCount+ row.count %}
|
||||
{% set totalSum = totalSum + row.sum %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% if averageExpenses|length > listLength %}
|
||||
<tr>
|
||||
<td colspan="4" class="active">
|
||||
<a href="#"
|
||||
class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{{ 'sum'|_ }}
|
||||
</td>
|
||||
<td style="text-align:right">{{ totalSum|formatAmount }}</td>
|
||||
<td>{{ totalCount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expense_per_source_account'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="source-accounts-out-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if topExpenses|length > 0 %}
|
||||
<div class="col-lg-6">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expenses'|_ }} ({{ trans('firefly.topX', {number: listLength}) }}
|
||||
)</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsort="disabled">{{ 'description'|_ }}</th>
|
||||
<th data-defaultsign="month">{{ 'date'|_ }}</th>
|
||||
<th data-defaultsign="az">{{ 'account'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'amount'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set totalSum = 0 %}
|
||||
{% for row in topExpenses %}
|
||||
{% set totalSum = totalSum + row.amount %}
|
||||
{% if loop.index > listLength %}
|
||||
<tr class="overListLength">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
<td data-sortable="false">
|
||||
<a href="{{ route('transactions.show', 1+row.transaction_group_id) }}">
|
||||
{% if row.group_title|length > 0 %}
|
||||
{{ row.group_title }} ({{ row.description }})
|
||||
{% else %}
|
||||
{{ row.description }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td data-value="{{ row.date.format('Y-m-d') }}">
|
||||
{{ row.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
<td data-value="{{ row.destination_account_name }}">
|
||||
<a href="{{ route('accounts.show', row.destination_account_id) }}">
|
||||
{{ row.destination_account_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td data-value="{{ row.amount }}" style="text-align: right;">
|
||||
{{ formatAmountBySymbol(row.amount, row.currency_symbol, row.currency_decimal_places) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% if topExpenses|length > listLength %}
|
||||
<tr>
|
||||
<td colspan="3" class="active">
|
||||
<a href="#"
|
||||
class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
{{ 'sum'|_ }}
|
||||
</td>
|
||||
<td style="text-align:right">{{ totalSum|formatAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income_per_source_account'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="source-accounts-in-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% if averageIncome|length > 0 %}
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'average_income_per_account'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="az">{{ 'account'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align:right;">{{ 'income_average'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align:right;">{{ 'total'|_ }}</th>
|
||||
<th data-defaultsign="_19">{{ 'transaction_count'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set totalCount = 0 %}
|
||||
{% set totalSum = 0 %}
|
||||
{% for row in averageIncome %}
|
||||
{% set totalCount = totalCount+ row.count %}
|
||||
{% set totalSum = totalSum + row.sum %}
|
||||
<tr>
|
||||
<td data-value="{{ row.name }}">
|
||||
<a href="{{ route('accounts.show', row.id) }}">{{ row.name }}</a>
|
||||
</td>
|
||||
<td data-value="{{ row.average }}" style="text-align:right;">
|
||||
{{ (row.average*-1)|formatAmount }}
|
||||
</td>
|
||||
<td data-value="{{ row.sum }}" style="text-align:right;">
|
||||
{{ (row.sum*-1)|formatAmount }}
|
||||
</td>
|
||||
<td data-value="{{ row.count }}">
|
||||
{{ row.count }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{{ 'sum'|_ }}
|
||||
</td>
|
||||
<td style="text-align:right">{{ (totalSum*-1)|formatAmount }}</td>
|
||||
<td>{{ totalCount }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expense_per_destination_account'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="dest-accounts-out-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income_per_destination_account'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div style="width:100%;margin:0 auto;">
|
||||
<canvas id="dest-accounts-in-pie-chart" style="width:100%;height:250px;" height="250"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for category in categories %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box main_budget_chart">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income_and_expenses'|_ }} ({{ category.name }})</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{#<canvas class="main_budget_canvas" data-url="{{ route('chart.category.main', [accountIds, category.id, start.format('Ymd'), end.format('Ymd')]) }}" id="in-out-chart-{{ category.id }}" style="width:100%;height:400px;" height="400" width="100%"></canvas>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
{% if topIncome|length > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income'|_ }} ({{ trans('firefly.topX', {number: listLength}) }})</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsort="disabled">{{ 'description'|_ }}</th>
|
||||
<th data-defaultsign="month">{{ 'date'|_ }}</th>
|
||||
<th data-defaultsign="az">{{ 'account'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align:right">{{ 'amount'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set totalSum = 0 %}
|
||||
{% for row in topIncome %}
|
||||
{% set totalSum = totalSum + row.amount %}
|
||||
{% if loop.index > listLength %}
|
||||
<tr class="overListLength">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
<td data-sortable="false">
|
||||
<a href="{{ route('transactions.show', 1+row.transaction_group_id) }}">
|
||||
{% if row.group_title|length > 0 %}
|
||||
{{ row.group_title }} ({{ row.description }})
|
||||
{% else %}
|
||||
{{ row.description }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td data-value="{{ row.date.format('Y-m-d') }}">
|
||||
{{ row.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
<td data-value="{{ row.destination_account_name }}">
|
||||
<a href="{{ route('accounts.show', row.destination_account_id) }}">
|
||||
{{ row.destination_account_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td data-value="{{ row.amount }}" style="text-align: right;">
|
||||
{{ formatAmountBySymbol(row.amount*-1, row.currency_symbol, row.currency_decimal_places) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% if topIncome|length > listLength %}
|
||||
<tr>
|
||||
<td colspan="3" class="active">
|
||||
<a href="#"
|
||||
class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
{{ 'sum'|_ }}
|
||||
</td>
|
||||
<td style="text-align:right">{{ (totalSum*-1)|formatAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'average_spending_per_destination'|_ }}</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="box-body table-responsive no-padding" id="avgExpensesHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'average_earning_per_source'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding" id="avgIncomeHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'expenses'|_ }} ({{ trans('firefly.topX', {number: listLength}) }})</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding" id="topExpensesHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'income'|_ }} ({{ trans('firefly.topX', {number: listLength}) }})</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding" id="topIncomeHolder">
|
||||
</div>
|
||||
{# loading indicator #}
|
||||
<div class="overlay">
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -447,15 +226,24 @@
|
||||
var accountIds = '{{ accountIds }}';
|
||||
var categoryIds = '{{ categoryIds }}';
|
||||
|
||||
// html block URI's:
|
||||
|
||||
var accountsUri = '{{ route('report-data.category.accounts', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
|
||||
{#var categoriesUri = '{{ route('report-data.category.categories', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var accountPerCategoryUri = '{{ route('report-data.category.account-per-category', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var avgExpensesUri = '{{ route('report-data.category.avg-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var topExpensesUri = '{{ route('report-data.category.top-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
|
||||
{#var avgIncomeUri = '{{ route('report-data.category.avg-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var topIncomesUri = '{{ route('report-data.category.top-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
|
||||
// chart uri's
|
||||
var categoryIncomeUri = '{{ route('chart.category.category-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
|
||||
var categoryExpenseUri = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
|
||||
var accountIncomeUri = '{{ route('chart.category.account-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
|
||||
var accountExpenseUri = '{{ route('chart.category.account-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
|
||||
var mainUri = '{{ route('chart.category.main', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
{#var budgetExpenseUri = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var categoryExpenseUri = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var sourceExpenseUri = '{{ route('chart.budget.source-account-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
{#var destinationExpenseUri = '{{ route('chart.budget.destination-account-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';#}
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="v1/js/ff/reports/all.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/reports/category/month.js?v={{ FF_VERSION }}"></script>
|
||||
|
||||
|
32
resources/views/v1/reports/category/partials/accounts.twig
Normal file
32
resources/views/v1/reports/category/partials/accounts.twig
Normal file
@@ -0,0 +1,32 @@
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="az">{{ 'name'|_ }}</th>
|
||||
<th data-defaultsign="_19" style="text-align: right;">{{ 'spent'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in report %}
|
||||
{% for currency in account.currencies %}
|
||||
<tr>
|
||||
<td data-value="{{ account.name }} ({{ currency.currency_name }})">
|
||||
<a href="{{ route('accounts.show', account.id) }}" title="{{ account.iban }}">{{ account.name }} ({{ currency.currency_name }})</a>
|
||||
</td>
|
||||
<td data-value="{{ currency.sum }}" style="text-align: right;">
|
||||
{{ formatAmountBySymbol(currency.sum, currency.currency_symbol, currency.currency_decimal_places) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% for sum in sums %}
|
||||
<tr>
|
||||
<td>{{ 'sum'|_ }} ({{ sum.currency_name }})</td>
|
||||
<td style="text-align: right;">
|
||||
{{ formatAmountBySymbol(sum.sum, sum.currency_symbol, sum.currency_decimal_places) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tfoot>
|
||||
</table>
|
Reference in New Issue
Block a user