Create reconciliation transaction.

This commit is contained in:
James Cole
2017-11-22 17:49:06 +01:00
parent 69bb76b6fe
commit ba6a147032
8 changed files with 143 additions and 27 deletions

View File

@@ -35,38 +35,42 @@
<td>{{ 'submitted_end_balance'|_ }} (date)</td>
<td>{{ endBalance|formatAmount }}</td>
</tr>
{% set diff = (startBalance - endBalance) + clearedAmount + amount %}
<tr>
<td>{{ 'difference'|_ }}</td>
<td>{{ diff|formatAmount }}</td>
<td>
{{ difference|formatAmount }}
<input type="hidden" name="difference" value="{{ difference }}" />
</td>
</tr>
</table>
<p>
{% if diff > 0 %}
{% if diffCompare > 0 %}
{{ 'reconcile_has_more'|_ }}
{% endif %}
{% if diff < 0 %}
{% if diffCompare < 0 %}
{{ 'reconcile_has_less'|_ }}
{% endif %}
</p>
{% if diff == 0 %}
{% if diffCompare == 0 %}
<p>
{{ 'reconcile_is_equal'|_ }}
</p>
<input type="hidden" name="reconcile" value="nothing">
{% endif %}
{% if diff != 0 %}
{% if diffCompare != 0 %}
<div class="form-group">
<div class="col-lg-12">
<div class="radio">
<label>
<input type="radio" name="reconcile" value="create">
{% if diff > 0 %}
{{ trans('firefly.create_neg_reconcile_transaction', {amount: (diff*-1)|formatAmount})|raw }}
{% if diffCompare > 0 %}
{{ trans('firefly.create_neg_reconcile_transaction', {amount: (difference*-1)|formatAmount})|raw }}
{% endif %}
{% if diff < 0 %}
{{ trans('firefly.create_pos_reconcile_transaction', {amount: (diff*-1)|formatAmount})|raw }}
{% if diffCompare < 0 %}
{{ trans('firefly.create_pos_reconcile_transaction', {amount: (difference*-1)|formatAmount})|raw }}
{% endif %}
</label>
</div>

View File

@@ -18,7 +18,7 @@
{% for account in accounts %}
<tr>
<td class="hidden-sm hidden-xs">
<div class="btn-group btn-group-xs edit_tr_buttons"><a class="btn btn-default btn-xs" title="{{ 'edit'|_ }}" href="{{ route('accounts.edit',account.id) }}"><i class="fa fa-fw fa-pencil"></i></a><a class="btn btn-default btn-xs" title="{{ 'reconcile'|_ }}" href="{{ route('accounts.reconcile',account.id) }}"><i class="fa fa-fw fa-check"></i></a><a class="btn btn-danger btn-xs" title="{{ 'delete'|_ }}" href="{{ route('accounts.delete',account.id) }}"><i class="fa fa-fw fa-trash-o"></i></a></div>
<div class="btn-group btn-group-xs edit_tr_buttons"><a class="btn btn-default btn-xs" title="{{ 'edit'|_ }}" href="{{ route('accounts.edit',account.id) }}"><i class="fa fa-fw fa-pencil"></i></a>{% if what == 'asset' %}<a class="btn btn-default btn-xs" title="{{ 'reconcile'|_ }}" href="{{ route('accounts.reconcile',account.id) }}"><i class="fa fa-fw fa-check"></i></a>{% endif %}<a class="btn btn-danger btn-xs" title="{{ 'delete'|_ }}" href="{{ route('accounts.delete',account.id) }}"><i class="fa fa-fw fa-trash-o"></i></a></div>
</td>
<td data-value="{{ account.name }}"><a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a></td>
{% if what == "asset" %}