firefly-iii/resources/views/accounts/show.twig

162 lines
7.7 KiB
Twig
Raw Normal View History

2016-11-06 01:11:43 -06:00
{% extends "./layout/default" %}
2015-06-19 13:59:14 -05:00
{% block breadcrumbs %}
2018-02-09 09:47:01 -06:00
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, account, start, end) }}
2015-06-19 13:59:14 -05:00
{% endblock %}
2015-05-01 15:44:35 -05:00
{% block content %}
2015-06-22 11:50:54 -05:00
<div class="row">
2017-06-30 00:17:25 -05:00
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
2015-06-22 11:50:54 -05:00
<div class="box">
<div class="box-header with-border">
2017-03-10 09:08:58 -06:00
<h3 class="box-title">
2018-02-09 09:47:01 -06:00
{{ trans('firefly.chart_account_in_period', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) }) }}
</h3>
2015-06-22 11:50:54 -05:00
<div class="box-tools pull-right">
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('accounts.edit', account.id) }}"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('accounts.delete', account.id) }}"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}</a></li>
</ul>
</div>
2015-05-01 15:44:35 -05:00
</div>
</div>
2015-06-22 11:50:54 -05:00
<div class="box-body">
2017-04-29 01:56:08 -05:00
<canvas id="overview-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>
2015-06-22 11:50:54 -05:00
</div>
2015-05-01 15:44:35 -05:00
</div>
</div>
</div>
2016-11-20 11:31:29 -06:00
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expenses_by_category'|_ }}</h3>
</div>
<div class="box-body">
2017-04-29 01:56:08 -05:00
<div style="width:100%;margin:0 auto;">
<canvas id="account-cat-out" style="width:100%;height:250px;" height="250"></canvas>
2016-11-20 11:31:29 -06:00
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'expenses_by_budget'|_ }}</h3>
</div>
<div class="box-body">
2017-04-29 01:56:08 -05:00
<div style="width:100%;margin:0 auto;">
<canvas id="account-budget-out" style="width:100%;height:250px;" height="250"></canvas>
2016-11-20 11:31:29 -06:00
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'income_by_category'|_ }}</h3>
</div>
<div class="box-body">
2017-04-29 01:56:08 -05:00
<div style="width:100%;margin:0 auto;">
<canvas id="account-cat-in" style="width:100%;height:250px;" height="250"></canvas>
2016-11-20 11:31:29 -06:00
</div>
</div>
</div>
</div>
</div>
2017-12-30 14:04:04 -06:00
{% if account.notes.count == 1 %}
<div class="row">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'notes'|_ }}</h3>
</div>
<div class="box-body">
{{ account.notes.first.text|markdown }}
</div>
</div>
</div>
{% endif %}
2015-06-22 11:50:54 -05:00
<div class="row">
2017-06-30 00:17:25 -05:00
<div class="{% if periods.count > 0 %}col-lg-10 col-md-8 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
2015-06-22 11:50:54 -05:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
</div>
2016-04-23 11:53:16 -05:00
<div class="box-body">
2017-12-03 02:01:39 -06:00
{% if account.accountType.type == 'Asset account' %}
{% set showReconcile = true %}
{% else %}
{% set showReconcile = false %}
{% endif %}
{% include 'list.journals' with {sorting:true, hideBills:true, hideBudgets: true, hideCategories: true, showReconcile: showReconcile} %}
2018-02-09 09:47:01 -06:00
<p>
<i class="fa fa-calendar"></i>
<a href="{{ route('accounts.show', [account.id]) }}">
{{ 'show_the_current_period_and_overview'|_ }}
</a>
</p>
2015-06-22 11:50:54 -05:00
</div>
2015-05-01 15:44:35 -05:00
</div>
2015-06-22 10:55:37 -05:00
</div>
{% if periods.count > 0 %}
2017-06-30 00:17:25 -05:00
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
{% for period in periods %}
{% if (period.spent != 0 or period.earned != 0) %}
2018-01-14 03:57:27 -06:00
<div class="box {% if period.date == end %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
2018-02-09 09:47:01 -06:00
<h3 class="box-title"><a href="{{ route('accounts.show',[account.id,period.start,period.end]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
2017-04-23 02:33:33 -05:00
{% if period.spent != 0 %}
<tr>
2017-01-02 14:04:17 -06:00
<td style="width:33%;">{{ 'spent'|_ }}</td>
2017-06-06 00:18:09 -05:00
<td style="text-align: right;">{{ formatAmountByCurrency(currency, period.spent) }}</td>
</tr>
{% endif %}
2017-04-23 02:33:33 -05:00
{% if period.earned != 0 %}
<tr>
2017-01-02 14:04:17 -06:00
<td style="width: 33%;">{{ 'earned'|_ }}</td>
2017-06-06 00:18:09 -05:00
<td style="text-align: right;">{{ formatAmountByCurrency(currency, period.earned) }}</td>
</tr>
{% endif %}
</table>
</div>
2016-05-13 08:53:39 -05:00
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
2015-05-01 15:44:35 -05:00
</div>
2015-06-22 11:50:54 -05:00
{% endblock %}
2015-05-01 15:44:35 -05:00
2015-06-22 11:50:54 -05:00
{% block scripts %}
<script type="text/javascript">
2017-04-15 00:25:09 -05:00
currencySymbol = "{{ currency.symbol }}";
2015-06-22 11:50:54 -05:00
var accountID = {{ account.id }};
2016-11-20 11:31:29 -06:00
// uri's for charts:
2016-12-11 04:15:19 -06:00
var chartUri = '{{ chartUri }}';
{% if start and end %}
2018-02-09 09:47:01 -06:00
var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
{% endif %}
2016-11-20 11:31:29 -06:00
2015-06-22 11:50:54 -05:00
</script>
<script type="text/javascript" src="js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/charts.defaults.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/charts.js?v={{ FF_VERSION }}"></script>
2017-04-15 00:25:09 -05:00
<script src="js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" type="text/javascript"></script>
<script src="js/lib/jquery.color-2.1.2.min.js?v={{ FF_VERSION }}" type="text/javascript"></script>
<script src="js/ff/accounts/show.js?v={{ FF_VERSION }}" type="text/javascript"></script>
<script type="text/javascript" src="js/ff/transactions/list.js?v={{ FF_VERSION }}"></script>
2015-06-22 11:50:54 -05:00
{% endblock %}