Allow user to split unsplit journal

This commit is contained in:
James Cole 2016-05-20 07:51:26 +02:00
parent 0347649f42
commit ed948cc965
3 changed files with 21 additions and 9 deletions

View File

@ -644,12 +644,9 @@ return [
'saveOnAccount' => 'Save on account',
'unknown' => 'Unknown',
'daily' => 'Daily',
'weekly' => 'Weekly',
'monthly' => 'Monthly',
'quarterly' => 'Quarterly',
'half-year' => 'Every six months',
'yearly' => 'Yearly',
'profile' => 'Profile',
'errors' => 'Errors',
// reports:
'report_default' => 'Default financial report for :start until :end',
@ -834,5 +831,10 @@ return [
'split-transactions' => 'Split transactions',
'split-new-transaction' => 'Split a new transaction',
'do_split' => 'Do a split',
'split_this_withdrawal' => 'Split this withdrawal',
'split_this_deposit' => 'Split this deposit',
'split_this_transfer' => 'Split this transfer',
];

View File

@ -41,7 +41,7 @@
<!-- FREE FORMAT DESTINATION ACCOUNT ONLY FOR EXPENSES -->
{{ ExpandedForm.text('destination_account_name',null, {label: trans('form.expense_account')}) }}
<!-- SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS -->
<!-- SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS -->
{{ ExpandedForm.select('destination_account_id',assetAccounts, null, {label: trans('form.asset_destination_account')} ) }}

View File

@ -15,10 +15,10 @@
{% if errors.all|length > 0 %}
<div class="row">
<div class="col-lg-12">
<h4>Errors</h4>
<h3 class="text-danger">{{ 'errors'|_ }}</h3>
<ul>
{% for err in errors.all %}
<li>{{ err }}</li>
<li class="text-danger">{{ err }}</li>
{% endfor %}
</ul>
</div>
@ -51,8 +51,8 @@
{{ ExpandedForm.text('destination_account_name',data.destination_account_name, {label: trans('form.expense_account')}) }}
{% endif %}
<!-- SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS -->
{% if what == 'transfer' %}
<!-- SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS -->
{% if what == 'transfer' or what == 'deposit' %}
{{ ExpandedForm.select('destination_account_id',assetAccounts, data.destination_account_id, {label: trans('form.asset_destination_account')} ) }}
{% endif %}
@ -111,6 +111,16 @@
</div>
<div class="box-body">
{{ ExpandedForm.optionsList('update','transaction') }}
<div class="form-group" id="do_split_holder">
<label for="ffInput_do_split" class="col-sm-4 control-label">{{ 'do_split'|_ }}</label>
<div class="col-sm-8">
<p class="form-control-static">
<a href="{{ route('split.journal.edit', journal.id) }}">{{ ('split_this_'~what)|_ }}</a>
</p>
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ what)|_ }}</button>