2016-11-06 08:11:43 +01:00
|
|
|
{% extends "./layout/default" %}
|
2016-04-24 07:18:39 +02:00
|
|
|
|
|
|
|
{% block breadcrumbs %}
|
2016-12-11 10:38:06 +01:00
|
|
|
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journals) }}
|
2016-04-24 07:18:39 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-12-11 10:38:06 +01:00
|
|
|
<form method="POST" action="{{ route('transactions.mass.update') }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
2016-08-27 04:18:02 +02:00
|
|
|
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
2016-04-24 07:18:39 +02:00
|
|
|
|
2016-08-27 04:18:02 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
|
|
|
<div class="box box-default">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<h3 class="box-title">{{ 'mass_edit_journals'|_ }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
|
|
|
<p>
|
|
|
|
{{ 'cannot_edit_other_fields'|_ }}
|
|
|
|
</p>
|
|
|
|
<table class="table table-striped table-condensed">
|
|
|
|
<tr>
|
2016-09-03 05:01:48 +02:00
|
|
|
<tr>
|
|
|
|
<th class=""> </th>
|
2017-03-09 08:19:05 +01:00
|
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.description') }}</th>
|
2016-09-03 05:01:48 +02:00
|
|
|
<th class="col-lg-1 col-md-1 col-sm-1">{{ trans('list.amount') }}</th>
|
|
|
|
<th class="col-lg-1 col-md-1 col-sm-1">{{ trans('list.date') }}</th>
|
|
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.from') }}</th>
|
|
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.to') }}</th>
|
|
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.category') }}</th>
|
2017-03-09 08:19:05 +01:00
|
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.budget') }}</th>
|
2016-08-27 04:18:02 +02:00
|
|
|
</tr>
|
|
|
|
{% for journal in journals %}
|
|
|
|
{% if journal.transaction_count == 2 %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2017-03-09 08:19:05 +01:00
|
|
|
{# LINK TO EDIT FORM #}
|
|
|
|
<a href="{{ route('transactions.edit', journal.id) }}" class="btn btn-xs btn-default"><i
|
|
|
|
class="fa fa-fw fa-pencil"></i></a>
|
2016-08-27 04:18:02 +02:00
|
|
|
<input type="hidden" name="journals[]" value="{{ journal.id }}"/>
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-03-09 08:19:05 +01:00
|
|
|
{# DESCRIPTION #}
|
|
|
|
<input class="form-control input-sm" autocomplete="off"
|
|
|
|
placeholder="{{ journal.description }}" name="description[{{ journal.id }}]"
|
|
|
|
type="text" value="{{ journal.description }}">
|
2016-08-27 04:18:02 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2017-03-09 08:19:05 +01:00
|
|
|
<div class="input-group input-group-sm">
|
|
|
|
<span class="input-group-addon">{{ journal.transactionCurrency.symbol }}</span>
|
|
|
|
<input name="amount[{{ journal.id }}]" class="form-control" autocomplete="off"
|
|
|
|
step="any" type="number" value="{{ journal.amount }}">
|
|
|
|
</div>
|
|
|
|
|
2016-08-27 04:18:02 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2017-03-09 08:19:05 +01:00
|
|
|
{# DATE #}
|
|
|
|
<input class="form-control input-sm" autocomplete="off"
|
|
|
|
name="date[{{ journal.id }}]" type="date" value="{{ journal.date.format('Y-m-d') }}">
|
2016-08-27 04:18:02 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2017-03-09 08:19:05 +01:00
|
|
|
{# SOURCE ACCOUNT ID FOR TRANSFER OR WITHDRAWAL #}
|
2016-08-27 04:18:02 +02:00
|
|
|
{% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Withdrawal' %}
|
2017-03-09 08:19:05 +01:00
|
|
|
<select class="form-control input-sm" name="source_account_id[{{ journal.id }}]">
|
|
|
|
{% for account in accounts %}
|
|
|
|
<option value="{{ account.id }}"{% if account.id==journal.source_account_id %} selected="selected"{% endif %}
|
|
|
|
label="{{ account.name }}">{{ account.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2016-08-27 04:18:02 +02:00
|
|
|
{% else %}
|
2017-03-09 08:19:05 +01:00
|
|
|
{# SOURCE ACCOUNT NAME FOR DEPOSIT #}
|
2017-04-09 07:56:46 +02:00
|
|
|
<input class="form-control input-sm" placeholder="{{ journal.source_account_name }}"
|
|
|
|
name="source_account_name[{{ journal.id }}]" type="text" value="{{ journal.source_account_name }}">
|
2016-08-27 04:18:02 +02:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Deposit' %}
|
2017-03-09 08:19:05 +01:00
|
|
|
{# DESTINATION ACCOUNT NAME FOR TRANSFER AND DEPOSIT #}
|
|
|
|
<select class="form-control input-sm" name="destination_account_id[{{ journal.id }}]">
|
|
|
|
{% for account in accounts %}
|
|
|
|
<option value="{{ account.id }}"{% if account.id==journal.destination_account_id %} selected="selected"{% endif %}
|
|
|
|
label="{{ account.name }}">{{ account.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2016-08-27 04:18:02 +02:00
|
|
|
{% else %}
|
2017-03-09 08:19:05 +01:00
|
|
|
{# DESTINATION ACCOUNT NAME FOR EXPENSE #}
|
2017-04-09 07:56:46 +02:00
|
|
|
<input class="form-control input-sm" placeholder="{{ journal.destination_account_name }}"
|
|
|
|
name="destination_account_name[{{ journal.id }}]" type="text"
|
|
|
|
value="{{ journal.destination_account_name }}">
|
2016-08-27 04:18:02 +02:00
|
|
|
{% endif %}
|
2016-09-03 05:01:48 +02:00
|
|
|
</td>
|
2017-03-09 08:19:05 +01:00
|
|
|
{# category #}
|
|
|
|
<td>
|
2017-04-09 07:56:46 +02:00
|
|
|
<input class="form-control input-sm" placeholder="{{ journal.categories[0].name }}"
|
|
|
|
name="category[{{ journal.id }}]" type="text" value="{{ journal.categories[0].name }}">
|
2017-03-09 08:19:05 +01:00
|
|
|
</td>
|
|
|
|
{# budget #}
|
2016-09-03 05:01:48 +02:00
|
|
|
<td>
|
2017-03-09 08:19:05 +01:00
|
|
|
{% if journal.transaction_type_type == 'Withdrawal' %}
|
|
|
|
<select class="form-control input-sm" name="budget_id[{{ journal.id }}]">
|
|
|
|
<option value="0" label="(none)"
|
2017-04-09 07:56:46 +02:00
|
|
|
{% if journal.budgets.count == 0 %}selected="selected"{% endif %}
|
|
|
|
>(none)
|
|
|
|
</option>
|
2017-03-09 08:19:05 +01:00
|
|
|
{% for budget in budgets %}
|
|
|
|
<option value="{{ budget.id }}"{% if budget.id==journal.budgets[0].id %} selected="selected"{% endif %}
|
|
|
|
label="{{ budget.name }}">{{ budget.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
{% endif %}
|
2016-08-27 04:18:02 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="box-footer">
|
|
|
|
{% if journals.count > 0 %}
|
2016-11-12 06:34:54 +01:00
|
|
|
<input type="submit" name="submit" value="{{ trans('form.update_all_journals') }}" class="btn btn-success pull-right"/>
|
2016-08-27 04:18:02 +02:00
|
|
|
{% endif %}
|
|
|
|
<a href="{{ route('index') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
2016-07-17 08:50:22 +02:00
|
|
|
|
2016-08-27 04:18:02 +02:00
|
|
|
</div>
|
2016-04-24 07:18:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-27 04:18:02 +02:00
|
|
|
</form>
|
2016-04-24 07:18:39 +02:00
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
2017-01-15 19:28:54 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
var what = "";
|
|
|
|
</script>
|
2016-04-24 07:18:39 +02:00
|
|
|
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
|
2017-01-15 19:28:54 +01:00
|
|
|
<script type="text/javascript" src="js/ff/transactions/mass/edit.js"></script>
|
2016-04-24 09:02:21 +02:00
|
|
|
{% endblock %}
|