Files
firefly-iii/resources/views/accounts/reconcile/index.twig

259 lines
13 KiB
Twig
Raw Normal View History

2017-11-10 15:00:24 +01:00
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account, moment, start, end) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'reconcile_range'|_ }}</h3>
</div>
<div class="box-body no-padding">
2017-11-10 18:25:11 +01:00
<table class="table table-hover">
2017-11-10 15:00:24 +01:00
<thead>
<tr>
<th colspan="2" style="width:50%;">{{ 'start_balance'|_ }}</th>
<th colspan="2">{{ 'end_balance'|_ }}</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:25%;">
{{ 'date'|_ }}
</td>
<td style="width:25%;">
{{ 'balance'|_ }}
</td>
<td style="width:25%;">
{{ 'date'|_ }}
</td>
<td style="width:25%;">
{{ 'balance'|_ }}
</td>
</tr>
<tr>
<td>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="date" value="{{ start.format('Y-m-d') }}" name="start_date" class="form-control">
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon non-selectable-currency-symbol">{{ currency.symbol }}</span>
<input type="number" value="{{ startBalance }}" name="start_balance" class="form-control">
</div>
</td>
<td>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="date" value="{{ end.format('Y-m-d') }}" name="end_date" class="form-control">
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon non-selectable-currency-symbol">{{ currency.symbol }}</span>
<input type="number" value="{{ endBalance }}" name="end_balance" class="form-control">
</div>
</td>
</tr>
</tbody>
<tfoot>
2017-11-13 16:26:44 +01:00
<tr>
<td colspan="3">
<div class="update_balance_instruction">
{{ 'update_balance_dates_instruction'|_ }}
</div>
<div class="select_transactions_instruction" style="display:none;">
{{ 'select_transactions_instruction'|_ }}
</div>
</td>
<td>
<a href="#" class="btn btn-default start_reconcile">{{ 'start_reconcile'|_ }}</a>
2017-11-10 15:00:24 +01:00
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'reconcile_options'|_ }}</h3>
</div>
2017-11-10 18:25:11 +01:00
<div class="box-body no-padding">
<table class="table table-hover">
<thead>
<tr>
<th style="width:50%;">{{ 'difference'|_ }}</th>
<th>{{ 'actions'|_ }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>
2017-11-13 16:26:44 +01:00
<p class="lead" id="difference"></p>
2017-11-10 18:25:11 +01:00
</td>
<td>
<div class="btn-group">
2017-11-13 16:26:44 +01:00
<button class="btn btn-default store_reconcile" disabled><i class="fa fa-fw fa-check"></i> {{ 'store_reconcile'|_ }}</button>
2017-11-10 18:25:11 +01:00
</div>
</td>
</tr>
</tbody>
</table>
2017-11-10 15:00:24 +01:00
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
</div>
<div class="box-body">
2017-11-10 18:25:11 +01:00
<table class="table table-striped table-condensed">
<thead>
<tr class="ignore">
<th class="hidden-xs" colspan="2">&nbsp;</th>
<th>{{ trans('list.description') }}</th>
<th style="text-align:right;">{{ trans('list.amount') }}</th>
<th class="hidden-xs hidden-sm hidden-md">{{ trans('list.reconcile') }}</th>
<th class="hidden-xs hidden-sm">{{ trans('list.date') }}</th>
<th class="hidden-xs hidden-sm hidden-md">{{ trans('list.from') }}</th>
<th class="hidden-xs hidden-sm hidden-md">{{ trans('list.to') }}</th>
<th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th>
<th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>
</tr>
</thead>
<tbody>
{# data for previous/next markers #}
{% set endSet = false %}
{% set startSet = false %}
{% for transaction in transactions %}
{# start marker #}
{% if transaction.date < start and startSet == false %}
<tr>
<td colspan="5">
&nbsp;
</td>
<td colspan="3">
<span class="label label-default">
{{ trans('firefly.start_of_reconcile_period', {period: start.formatLocalized(monthAndDayFormat) }) }}
</span>
</td>
<td colspan="2">
&nbsp;
</td>
</tr>
{% set startSet = true %}
{% endif %}
2017-11-13 16:26:44 +01:00
{# end marker #}
{% if transaction.date <= end and endSet == false %}
<tr>
<td colspan="5">
&nbsp;
</td>
<td colspan="3">
<span class="label label-default">
{{ trans('firefly.end_of_reconcile_period', {period: end.formatLocalized(monthAndDayFormat) }) }}
</span>
</td>
<td colspan="2">
&nbsp;
</td>
</tr>
{% set endSet = true %}
{% endif %}
2017-11-10 18:25:11 +01:00
<tr data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}"
data-transaction-id="{{ transaction.id }}">
<td class="hidden-xs">
<div class="btn-group btn-group-xs">
<a href="{{ route('transactions.edit',transaction.journal_id) }}" class="btn btn-xs btn-default"><i
class="fa fa-fw fa-pencil"></i></a>
</div>
</td>
{# icon #}
<td class="hidden-xs">
{{ transaction|transactionIcon }}
</td>
{# description #}
<td>
<a href="{{ route('transactions.show',transaction.journal_id) }}">
{{ transaction|transactionDescription }}
</a>
{# is a split journal #}
{{ transaction|transactionIsSplit }}
{# count attachments #}
{{ transaction|transactionHasAtt }}
</td>
<td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>
<td>
2017-11-13 16:26:44 +01:00
{% if transaction.reconciled %}
{{ transaction|transactionReconciled }}
{% else %}
<input type="checkbox" name="reconciled[]"
data-younger="{% if transaction.date > end %}true{% else %}false{% endif %}"
value="{{ transaction.transaction_amount }}" data-id="{{ transaction.id }}" disabled class="reconcile_checkbox">
{% endif %}
2017-11-10 18:25:11 +01:00
</td>
<td class="hidden-sm hidden-xs">
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
</td>
<td class="hidden-xs hidden-sm hidden-md">
{# all source accounts #}
{{ transaction|transactionSourceAccount }}
</td>
<td class="hidden-xs hidden-sm hidden-md">
{# all destination accounts #}
{{ transaction|transactionDestinationAccount }}
</td>
<td class="hidden-xs">
{{ transaction|transactionBudgets }}
</td>
<td class="hidden-xs">
{{ transaction|transactionCategories }}
</td>
</tr>
2017-11-13 16:26:44 +01:00
2017-11-10 18:25:11 +01:00
{% endfor %}
</tbody>
</table>
2017-11-10 15:00:24 +01:00
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
currencySymbol = "{{ currency.symbol }}";
var accountID = {{ account.id }};
2017-11-10 18:25:11 +01:00
var startBalance = {{ startBalance }};
var endBalance = {{ endBalance }};
2017-11-10 15:00:24 +01:00
</script>
<script src="js/ff/accounts/reconcile.js?v={{ FF_VERSION }}" type="text/javascript"></script>
{% endblock %}