mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
143 lines
10 KiB
Twig
143 lines
10 KiB
Twig
{% extends "./layout/default" %}
|
|
|
|
{% block breadcrumbs %}
|
|
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, transactions) }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<form method="POST" action="{{ route('transactions.mass.update') }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
|
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
|
|
|
<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>
|
|
<th class=""> </th>
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.description') }}</th>
|
|
<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>
|
|
<th class="col-lg-2 col-md-2 col-sm-2">{{ trans('list.budget') }}</th>
|
|
</tr>
|
|
{% for transaction in transactions %}
|
|
<tr>
|
|
<td>
|
|
{# LINK TO EDIT FORM #}
|
|
<a href="{{ route('transactions.edit', transaction.journal_id) }}" class="btn btn-xs btn-default"><i
|
|
class="fa fa-fw fa-pencil"></i></a>
|
|
<input type="hidden" name="journals[]" value="{{ transaction.journal_id }}"/>
|
|
</td>
|
|
<td>
|
|
{# DESCRIPTION #}
|
|
<input class="form-control input-sm" autocomplete="off"
|
|
placeholder="{{ transaction.description }}" name="description[{{ transaction.journal_id }}]"
|
|
type="text" value="{{ transaction.description }}">
|
|
</td>
|
|
{# AMOUNT #}
|
|
<td>
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-addon">{{ transaction.currency_symbol }}</span>
|
|
<input name="amount[{{ transaction.journal_id }}]" class="form-control" autocomplete="off"
|
|
step="any" type="number" value="{{ transaction.amount }}">
|
|
<input type="hidden" name="transaction_currency_id[{{ transaction.journal_id }}]"
|
|
value="{{ transaction.currency_id }}">
|
|
</div>
|
|
{% if transaction.foreign_amount %}
|
|
{# insert foreign data #}
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-addon">{{ transaction.foreign_currency_symbol }}</span>
|
|
<input name="foreign_amount[{{ transaction.journal_id }}]" class="form-control" autocomplete="off"
|
|
step="any" type="number" value="{{ transaction.foreign_amount }}">
|
|
<input type="hidden" name="foreign_currency_id[{{ transaction.journal_id }}]" value="{{ transaction.foreign_currency_id }}">
|
|
</div>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{# DATE #}
|
|
<input class="form-control input-sm" autocomplete="off"
|
|
name="date[{{ transaction.journal_id }}]" type="date" value="{{ transaction.date.format('Y-m-d') }}">
|
|
</td>
|
|
<td style="position: relative;">
|
|
{# SOURCE ACCOUNT ID FOR TRANSFER OR WITHDRAWAL #}
|
|
{% if transaction.type == 'Transfer' or transaction.type == 'Withdrawal' %}
|
|
<select class="form-control input-sm" name="source_id[{{ transaction.journal_id }}]">
|
|
{% for account in accounts %}
|
|
<!-- {{ transaction.type }}: {{ transaction.source_name }} -->
|
|
<option value="{{ account.id }}"{% if account.id == transaction.source_id %} selected{% endif %} label="{{ account.name }}">{{ account.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% else %}
|
|
{# SOURCE ACCOUNT NAME FOR DEPOSIT #}
|
|
<input class="form-control input-sm" placeholder="{% if transaction.source_type != 'Cash account' %}{{ transaction.source_name }}{% endif %}" autocomplete="off"
|
|
name="source_name[{{ transaction.journal_id }}]" type="text" value="{% if transaction.source_type != 'Cash account' %}{{ transaction.source_name }}{% endif %}">
|
|
{% endif %}
|
|
</td>
|
|
<td style="position: relative;">
|
|
{% if transaction.type == 'Transfer' or transaction.type == 'Deposit' %}
|
|
{# DESTINATION ACCOUNT NAME FOR TRANSFER AND DEPOSIT #}
|
|
<select class="form-control input-sm" name="destination_id[{{ transaction.journal_id }}]">
|
|
{% for account in accounts %}
|
|
<option value="{{ account.id }}"{% if account.id == transaction.destination_id %} selected="selected"{% endif %}
|
|
label="{{ account.name }}">{{ account.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% else %}
|
|
|
|
{# DESTINATION ACCOUNT NAME FOR EXPENSE #}
|
|
<input class="form-control input-sm" placeholder="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}"
|
|
name="destination_name[{{ transaction.journal_id }}]" type="text" autocomplete="off"
|
|
value="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}">
|
|
{% endif %}
|
|
</td>
|
|
{# category #}
|
|
<td style="position: relative;">
|
|
<input class="form-control input-sm" placeholder="{{ transaction.category_name }}" autocomplete="off"
|
|
name="category[{{ transaction.journal_id }}]" type="text" value="{{ transaction.category_name }}">
|
|
</td>
|
|
{# budget #}
|
|
<td>
|
|
{% if transaction.type == 'Withdrawal' %}
|
|
<select class="form-control input-sm" name="budget_id[{{ transaction.journal_id }}]">
|
|
<option value="0" label="({{ 'no_budget'|_ }})"
|
|
{% if transaction.budget_id == 0 %}selected="selected"{% endif %}
|
|
>({{ 'no_budget'|_ }})
|
|
</option>
|
|
{% for budget in budgets %}
|
|
<option value="{{ budget.id }}"{% if budget.id == transaction.budget_id %} selected="selected"{% endif %}
|
|
label="{{ budget.name }}">{{ budget.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
<div class="box-footer">
|
|
<input type="submit" name="submit" value="{{ trans('form.update_all_journals') }}" class="btn btn-success pull-right"/>
|
|
<a href="{{ route('index') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
{% block scripts %}
|
|
<script type="text/javascript">
|
|
var what = "";
|
|
</script>
|
|
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
|
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
|
<script type="text/javascript" src="v1/js/ff/transactions/mass/edit.js?v={{ FF_VERSION }}"></script>
|
|
{% endblock %}
|