firefly-iii/resources/twig/reports/year.twig

165 lines
6.5 KiB
Twig
Raw Normal View History

2015-05-02 11:26:55 -05:00
{% extends "./layout/default.twig" %}
{% block content %}
2015-05-15 14:01:24 -05:00
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, date, shared) }}
2015-05-15 13:38:39 -05:00
2015-05-15 15:00:00 -05:00
<div class="row">
<div class="col-lg-10 col-md-8 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-line-chart"></i>
{{ 'incomeVsExpenses'|_ }}
</div>
<div class="panel-body">
<div id="income-expenses-chart"></div>
</div>
</div>
2015-05-02 11:26:55 -05:00
</div>
2015-05-15 15:00:00 -05:00
<div class="col-lg-2 col-md-4 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-calendar"></i>
{{ 'incomeVsExpenses'|_ }}
</div>
<div class="panel-body">
<div id="income-expenses-sum-chart"></div>
</div>
</div>
2015-05-02 11:26:55 -05:00
</div>
</div>
2015-05-15 15:00:00 -05:00
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-credit-card fa-fw"></i>
{{ 'accountBalances'|_ }}
</div>
<table class="table table-bordered table-striped">
<tr>
<th>{{ 'name'|_ }}</th>
<th>{{ 'balanceStartOfYear'|_ }}</th>
<th>{{ 'balanceStartOfYear'|_ }}</th>
<th>{{ 'difference'|_ }}</th>
</tr>
{% for account in accounts %}
2015-05-02 11:26:55 -05:00
<tr>
<td>
2015-05-15 15:00:00 -05:00
<a href="{{ route('accounts.show',account.id) }}" title="{{ account.name }}">{{ account.name }}</a>
2015-05-02 11:26:55 -05:00
</td>
2015-05-15 15:00:00 -05:00
<td>{{ account.startBalance|formatAmount }}</td>
<td>{{ account.endBalance|formatAmount }}</td>
<td>{{ (account.endBalance - account.startBalance)|formatAmount }}</td>
2015-05-02 11:26:55 -05:00
</tr>
2015-05-15 15:00:00 -05:00
{% endfor %}
<tr>
<td><em>Sum of sums</em></td>
<td>{{ accountsSums.start|formatAmount }}</td>
<td>{{ accountsSums.end|formatAmount }}</td>
<td>{{ accountsSums.diff|formatAmount }}</td>
</tr>
</table>
2015-05-02 11:26:55 -05:00
</div>
2015-05-15 15:00:00 -05:00
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-fw fa-exchange" title="Transfer"></i>
{{ 'incomeVsExpenses'|_ }}
</div>
2015-05-02 11:26:55 -05:00
<table class="table table-bordered table-striped">
<tr>
2015-05-15 15:00:00 -05:00
<td>{{ 'in'|_ }}</td>
<td>{{ totalIncome|formatAmount }}</td>
2015-05-02 11:26:55 -05:00
</tr>
<tr>
2015-05-15 15:00:00 -05:00
<td>{{ 'out'|_ }}</td>
<td><span class="text-danger">{{ totalExpense|formatAmountPlain }}</span></td>
2015-05-02 11:26:55 -05:00
</tr>
<tr>
2015-05-15 15:00:00 -05:00
<td>{{ 'difference'|_ }}</td>
<td>{{ (totalIncome - totalExpense)|formatAmount }}</td>
2015-05-02 11:26:55 -05:00
</tr>
</table>
</div>
2015-05-15 15:00:00 -05:00
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-long-arrow-right fa-fw"></i>
{{ 'income'|_ }}
</div>
<table class="table">
{% for id,row in incomes %}
<tr>
<td>
<a href="{{ route('accounts.show',id) }}" title="{{ row.name }}">{{ row.name }}</a>
{% if row.count > 1 %}
<br /><small>{{ row.count }} {{ 'transactions'|_|lower }}</small>
{% endif %}
</td>
<td>{{ row.amount|formatAmount }}</td>
</tr>
{% endfor %}
2015-05-02 11:26:55 -05:00
<tr>
2015-05-15 15:00:00 -05:00
<td><em>{{ 'sum'|_ }}</em></td>
<td>{{ totalIncome|formatAmount }}</td>
2015-05-02 11:26:55 -05:00
</tr>
2015-05-15 15:00:00 -05:00
</table>
</div>
2015-05-02 11:26:55 -05:00
</div>
2015-05-15 15:00:00 -05:00
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-long-arrow-left fa-fw"></i>
{{ 'expenses'|_ }}
</div>
<table class="table">
{% set sum =0 %}
{% for expense in expenses %}
<tr>
<td><a href="{{ route('accounts.show',expense.id) }}">{{ expense.name }}</a></td>
<td><span class="text-danger">{{ expense.queryAmount|formatAmountPlain }}</span></td>
</tr>
{% set sum = sum + (expense.queryAmount * -1) %}
{% endfor %}
<tr>
<td><em>{{ 'sum'|_ }}</em></td>
2015-05-15 15:12:31 -05:00
<td><span class="text-danger">{{ (sum * -1)|formatAmountPlain }}</span></td>
2015-05-15 15:00:00 -05:00
</tr>
</table>
2015-05-02 11:26:55 -05:00
</div>
</div>
</div>
2015-05-15 15:00:00 -05:00
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-tasks fa-fw"></i>
{{ 'budgets'|_ }}
</div>
<div class="panel-body">
<div id="budgets"></div>
</div>
2015-05-02 11:26:55 -05:00
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
2015-05-15 15:00:00 -05:00
<!-- load the libraries and scripts necessary for Google Charts: -->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="js/gcharts.options.js"></script>
<script type="text/javascript" src="js/gcharts.js"></script>
2015-05-02 11:26:55 -05:00
2015-05-15 15:00:00 -05:00
<script type="text/javascript">
var year = '{{date.year}}';
var shared = {% if shared %}'/shared'
{% else %}''{% endif %};
</script>
2015-05-02 11:26:55 -05:00
2015-05-15 15:00:00 -05:00
<script type="text/javascript" src="js/reports.js"></script>
2015-05-02 11:26:55 -05:00
{% endblock %}