Implemented #595 for transactions.

This commit is contained in:
James Cole
2017-03-11 07:41:26 +01:00
parent 9dd2f447cc
commit 4abc271805
9 changed files with 257 additions and 226 deletions

View File

@@ -115,13 +115,22 @@ return [
'multi_select_no_selection' => 'None selected',
'multi_select_all_selected' => 'All selected',
'multi_select_filter_placeholder' => 'Find..',
'between_dates_breadcrumb' => 'Between :start and :end',
'all_journals_without_budget' => 'All transactions without a budget',
'all_journals_without_category' => 'All transactions without a category',
'journals_without_budget' => 'Transactions without a budget',
'all_journals_without_category' => 'All transactions without a category',
'journals_without_category' => 'Transactions without a category',
'all_journals_for_account' => 'All transactions for account :name',
'journals_in_period_for_account' => 'All transactions for account :name between :start and :end',
'transferred' => 'Transferred',
'all_withdrawal' => 'All expenses',
'title_withdrawal_between' => 'All expenses between :start and :end',
'all_deposit' => 'All revenue',
'title_deposit_between' => 'All revenue between :start and :end',
'all_transfers' => 'All transfers',
'title_transfers_between' => 'All transfers between :start and :end',
'all_transfer' => 'All transfers',
'title_transfer_between' => 'All transfers between :start and :end',
// repeat frequencies:

View File

@@ -1,27 +0,0 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what) }}
{% endblock %}
{% block content %}
{% if journals.count == 0 %}
{% include 'partials.empty' with {what: what, type: 'transactions',route: route('transactions.create', [what])} %}
{% else %}
<div class="row">
<div class="col-lg-12 col-sm-12 col-md-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body">
{% include 'list.journals-tasker' %}
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/ff/transactions/list.js"></script>
{% endblock %}

View File

@@ -1,33 +0,0 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what, carbon) }}
{% endblock %}
{% block content %}
{% if journals.count == 0 %}
<div class="row">
<div class="col-lg-12 col-sm-12 col-md-12">
<p class="well">
{{ 'no_transactions_in_period'|_ }}
</p>
</div>
</div>
{% else %}
<div class="row">
<div class="col-lg-12 col-sm-12 col-md-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body">
{% include 'list.journals-tasker' %}
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/ff/transactions/list.js"></script>
{% endblock %}

View File

@@ -1,46 +1,93 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what) }}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what, moment, start, end) }}
{% endblock %}
{% block content %}
{# upper show-all instruction #}
{% if periods.count > 0 %}
<div class="row">
<div class="col-lg-10 col-md-10 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body">
{% include 'list.journals-tasker' %}
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('transactions.index',[what, 'all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
<div class="row">
<div class="{% if periods.count > 0 %}col-lg-10 col-md-10 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body ">
{% include 'list.journals-tasker' with {'journals': journals} %}
{% if periods.count > 0 %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('transactions.index.all', [what]) }}">
{{ 'show_all_no_filter'|_ }}
</a>
<a href="{{ route('transactions.index', [what, 'all']) }}">{{ 'show_all_no_filter'|_ }}</a>
</p>
</div>
{% else %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('transactions.index', [what]) }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
</p>
{% endif %}
</div>
</div>
</div>
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for entry in entries %}
<div class="box">
{% for entry in periods %}
<div class="box {% if entry.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title">
<a href="{{ route('transactions.index.date',[what,entry[0]]) }}">{{ entry[1] }}</a>
<h3 class="box-title"><a href="{{ route('transactions.index',[what, entry.string]) }}">{{ entry.name }}</a>
</h3>
</div>
<div class="box-body">
&nbsp;
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ entry.count }}</td>
</tr>
{% if what == 'withdrawal' %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ entry.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'deposit' %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ entry.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'transfers' or what == 'transfer' %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ entry.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{# lower show-all instruction #}
{% if periods.count > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('transactions.index',[what, 'all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/ff/transactions/list.js"></script>