2015-05-02 12:19:47 -05:00
|
|
|
{% extends "./layout/default.twig" %}
|
2015-06-19 13:59:14 -05:00
|
|
|
|
|
|
|
{% block breadcrumbs %}
|
2015-05-02 12:19:47 -05:00
|
|
|
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }}
|
2015-06-19 13:59:14 -05:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2015-06-27 01:06:24 -05:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<h3 class="box-title">Metadata</h3>
|
|
|
|
</div>
|
|
|
|
<div class="box-body table-responsive no-padding">
|
|
|
|
<table class="table table-hover sortable">
|
2015-05-02 12:19:47 -05:00
|
|
|
<tr>
|
2015-06-27 01:06:24 -05:00
|
|
|
<td>{{ trans('list.date') }}</td>
|
|
|
|
<td>{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-06-27 01:06:24 -05:00
|
|
|
<td>{{ trans('list.type') }}</td>
|
|
|
|
<td>{{ journal.transactiontype.type|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-06-27 01:06:24 -05:00
|
|
|
<td>{{ trans('list.completed') }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<td>
|
2015-06-27 01:06:24 -05:00
|
|
|
{% if journal.completed %}
|
|
|
|
<span class="text-success">{{ 'yes'|_ }}</span>
|
|
|
|
{% else %}
|
|
|
|
<span class="text-danger">{{ 'no'|_ }}</span>
|
|
|
|
{% endif %}
|
2015-05-02 12:19:47 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
2015-06-27 01:06:24 -05:00
|
|
|
{% for budget in journal.budgets %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'budget'|_ }}</td>
|
|
|
|
<td><a href="{{ route('budgets.show',budget.id) }}">{{ budget.name }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% for category in journal.categories %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'category'|_ }}</td>
|
|
|
|
<td><a href="{{ route('categories.show',category.id) }}">{{ category.name }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% if journal.tags|length > 0 %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'tags'|_ }}</td>
|
|
|
|
<td>
|
|
|
|
{% for tag in journal.tags %}
|
|
|
|
|
|
|
|
<h4 style="display: inline;"><a class="label label-success" href="{{ route('tags.show',tag) }}">
|
|
|
|
{% if tag.tagMode == 'nothing' %}
|
|
|
|
<i class="fa fa-fw fa-tag"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% if tag.tagMode == 'balancingAct' %}
|
|
|
|
<i class="fa fa-fw fa-refresh"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% if tag.tagMode == 'advancePayment' %}
|
|
|
|
<i class="fa fa-fw fa-sort-numeric-desc"></i>
|
|
|
|
{% endif %}
|
|
|
|
{{ tag.tag }}</a>
|
|
|
|
</h4>
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
2015-05-02 12:19:47 -05:00
|
|
|
</div>
|
2015-06-27 01:06:24 -05:00
|
|
|
<div class="box-footer">
|
|
|
|
<div class="pull-right">
|
|
|
|
<a class="btn btn-default" href="{{ route('transactions.edit',journal.id) }}">{{ 'edit'|_ }}</a>
|
|
|
|
<a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-danger">{{ 'delete'|_ }}</a>
|
|
|
|
</div>
|
2015-05-02 12:19:47 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-06-27 01:06:24 -05:00
|
|
|
<!-- events, if present -->
|
|
|
|
{% if journal.piggyBankEvents|length > 0 %}
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
{{ 'piggyBanks'|_ }}
|
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
|
|
|
{% include 'list/piggy-bank-events' with {'events': journal.piggyBankEvents, 'showPiggyBank':true} %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
2015-05-02 12:19:47 -05:00
|
|
|
|
2015-06-27 01:06:24 -05:00
|
|
|
{% for t in journal.transactions %}
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<h3 class="box-title">{{ t.account.name }}</h3>
|
|
|
|
</div>
|
|
|
|
<table class="table table-hover sortable">
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'account'|_ }}</td>
|
|
|
|
<td><a href="{{ route('accounts.show',t.account.id) }}">{{ t.account.name }}</a></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'account_type'|_ }}</td>
|
|
|
|
<td>{{ t.account.accounttype.type|_ }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'amount'|_ }}</td>
|
|
|
|
<td>{{ t|formatTransaction }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>{{ 'newBalance'|_ }}</td>
|
|
|
|
<td>{{ t.before|formatAmount }} → {{ t.after|formatAmount }}</td>
|
|
|
|
</tr>
|
|
|
|
{% if t.description %}
|
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
|
|
|
<td>{{ t.description }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2015-05-02 12:19:47 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
2015-06-27 01:06:24 -05:00
|
|
|
<script type="text/javascript" src="js/transactions.js"></script>
|
2015-05-02 12:19:47 -05:00
|
|
|
{% endblock %}
|