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-05-02 12:19:47 -05:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
2015-06-20 00:29:25 -05:00
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
2015-05-02 12:19:47 -05:00
|
|
|
<i class="fa fa-info-circle fa-fw"></i>
|
|
|
|
Metadata
|
|
|
|
</div>
|
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ trans('list.date') }}</td>
|
|
|
|
<td>{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ trans('list.type') }}</td>
|
|
|
|
<td>{{ journal.transactiontype.type|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ trans('list.completed') }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<td>
|
|
|
|
{% if journal.completed %}
|
2015-05-14 08:53:56 -05:00
|
|
|
<span class="text-success">{{ 'yes'|_ }}</span>
|
2015-05-02 12:19:47 -05:00
|
|
|
{% else %}
|
2015-05-14 08:53:56 -05:00
|
|
|
<span class="text-danger">{{ 'no'|_ }}</span>
|
2015-05-02 12:19:47 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% for budget in journal.budgets %}
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ 'budget'|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<td><a href="{{route('budgets.show',budget.id)}}">{{ budget.name }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% for category in journal.categories %}
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ 'category'|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<td><a href="{{route('categories.show',category.id)}}">{{ category.name }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% if journal.tags|length > 0 %}
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ 'tags'|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
<!-- events, if present -->
|
|
|
|
{% if journal.piggyBankEvents|length > 0 %}
|
2015-06-20 00:29:25 -05:00
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
2015-05-14 08:53:56 -05:00
|
|
|
{{ 'piggyBanks'|_ }}
|
2015-05-02 12:19:47 -05:00
|
|
|
</div>
|
2015-06-20 00:29:25 -05:00
|
|
|
<div class="box-body">
|
2015-05-02 12:19:47 -05:00
|
|
|
{% 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">
|
|
|
|
|
|
|
|
{% for t in journal.transactions %}
|
2015-06-20 00:29:25 -05:00
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
2015-05-02 12:19:47 -05:00
|
|
|
{% if t.account.accounttype.type == 'Asset account' %}
|
|
|
|
<i class="fa fa-money fa-fw"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% if t.account.accounttype.type == 'Default account' %}
|
|
|
|
<i class="fa fa-money fa-fw"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% if t.account.accounttype.type == 'Expense account' %}
|
|
|
|
<i class="fa fa-shopping-cart fa-fw"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% if t.account.accounttype.type == 'Beneficiary account' %}
|
|
|
|
<i class="fa fa-shopping-cart fa-fw"></i>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if t.account.accounttype.type == 'Revenue account' %}
|
|
|
|
<i class="fa fa-download fa-fw"></i>
|
|
|
|
{% endif %}
|
2015-05-14 08:53:56 -05:00
|
|
|
<a href="{{route('accounts.show',t.account.id)}}">{{ t.account.name }}</a> <small>({{ t.account.accounttype.type|_ }})</small>
|
2015-05-02 12:19:47 -05:00
|
|
|
</div>
|
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ 'amount'|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<td>{{ t|formatTransaction }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2015-05-14 08:53:56 -05:00
|
|
|
<td>{{ 'newBalance'|_ }}</td>
|
2015-05-02 12:19:47 -05:00
|
|
|
<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 %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
|
|
|
<div class="btn-group">
|
2015-05-14 04:31:54 -05:00
|
|
|
<a class="btn btn-default" href="{{route('transactions.edit',journal.id)}}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a> <a href="{{route('transactions.delete',journal.id)}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> {{ 'delete'|_ }}</a>
|
2015-05-02 12:19:47 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
|
|
<script type="text/javascript" src="js/transactions.js"></script>
|
|
|
|
{% endblock %}
|