mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Move all layout files to a "v1" directory.
This commit is contained in:
@@ -1,138 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journals) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.bulk.update') }}" accept-charset="UTF-8" class="form-horizontal" id="update">
|
||||
<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_bulk_journals'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ 'mass_bulk_journals_explain'|_ }}
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('list.description') }}</th>
|
||||
<th>{{ trans('list.amount') }}</th>
|
||||
<th>{{ trans('list.date') }}</th>
|
||||
<th>{{ trans('list.category') }}</th>
|
||||
<th>{{ trans('list.budget') }}</th>
|
||||
<th>{{ trans('list.tags') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for journal in journals %}
|
||||
{% if journal.transaction_count == 2 %}
|
||||
<input type="hidden" name="journals[]" value="{{ journal.id }}"/>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('transactions.show', [journal.id]) }}">
|
||||
{{ journal.description }}</a></td>
|
||||
<td>{{ journal|journalTotalAmount }}</td>
|
||||
<td>{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
|
||||
<td>{{ journalCategories(journal)|raw }}</td>
|
||||
<td>{{ journalBudgets(journal)|raw }}</td>
|
||||
<td>
|
||||
{% for tag in journal.tags %}
|
||||
<a class="label label-success" href="{{ route('tags.show', [tag.id]) }}">
|
||||
<i class="fa fa-fw fa-tag"></i> {{ tag.tag }}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ 'bulk_set_new_values'|_ }}
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th style="width:25%;">{{ trans('list.category') }}</th>
|
||||
<td>
|
||||
<input class="form-control" placeholder="" name="category" autocomplete="off" type="text" value="">
|
||||
</td>
|
||||
<td>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input name="ignore_category" type="checkbox" value="1" checked>
|
||||
{{ 'no_bulk_category'|_ }}
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('list.budget') }}</th>
|
||||
<td>
|
||||
<select class="form-control" name="budget_id">
|
||||
{% for id, budget in budgetList %}
|
||||
<option value="{{ id }}" label="{{ budget }}">{{ budget }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input name="ignore_budget" type="checkbox" value="1" checked>
|
||||
{{ 'no_bulk_budget'|_ }}
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('list.tags') }}</th>
|
||||
<td>
|
||||
<input class="form-control" placeholder="" name="tags" autocomplete="off" type="text" value="">
|
||||
</td>
|
||||
<td>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input name="ignore_tags" type="checkbox" value="1" checked>
|
||||
{{ 'no_bulk_tags'|_ }}
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{% if journals.count > 0 %}
|
||||
<input type="submit" name="submit" value="{{ trans('form.update_all_journals') }}" class="btn btn-success pull-right"/>
|
||||
{% endif %}
|
||||
<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="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/mass/edit-bulk.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link href="css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
{% endblock %}
|
||||
@@ -1,221 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, destinationType, journal) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.convert.index.post', [destinationType.type|lower, journal.id]) }}" accept-charset="UTF-8"
|
||||
class="form-horizontal" id="store"
|
||||
enctype="multipart/form-data">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 col-md-12 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ ('convert_options_'~sourceType.type~destinationType.type)|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.staticText('type', sourceType.type|_) }}
|
||||
{{ ExpandedForm.staticText('description', '<a href="'~route('transactions.show', journal.id)~'">'~journal.description~'</a>') }}
|
||||
{{ ExpandedForm.staticText('date', journal.date.formatLocalized(monthAndDayFormat)) }}
|
||||
|
||||
{# in case of withdrawal #}
|
||||
{% if sourceType.type == "Withdrawal" %}
|
||||
{{ ExpandedForm.staticText('source_account_asset', '<a href="'~route('accounts.show',[sourceAccount.id])~'">'~sourceAccount.name~'</a>') }}
|
||||
{# if destination is cash, show (cash) #}
|
||||
{% if destinationAccount.accountType.type == "Cash account" %}
|
||||
{{ ExpandedForm.staticText('destination_account_expense', '<span class="text-success">(cash)</a>') }}
|
||||
{% else %}
|
||||
{{ ExpandedForm.staticText('destination_account_expense', '<a href="'~route('accounts.show',[destinationAccount.id])~'">'~destinationAccount.name~'</a>') }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{# in case of deposit #}
|
||||
{% if sourceType.type == "Deposit" %}
|
||||
{# if source is cash, show (cash) #}
|
||||
{% if sourceAccount.accountType.type == "Cash account" %}
|
||||
{{ ExpandedForm.staticText('source_account_revenue', '<span class="text-success">(cash)</a>') }}
|
||||
{% else %}
|
||||
{{ ExpandedForm.staticText('source_account_revenue', '<a href="'~route('accounts.show',[sourceAccount.id])~'">'~sourceAccount.name~'</a>') }}
|
||||
{% endif %}
|
||||
{{ ExpandedForm.staticText('destination_account_asset', '<a href="'~route('accounts.show',[destinationAccount.id])~'">'~destinationAccount.name~'</a>') }}
|
||||
{% endif %}
|
||||
|
||||
{# in case of transfer #}
|
||||
{% if sourceType.type == "Transfer" %}
|
||||
{{ ExpandedForm.staticText('source_account_asset', '<a href="'~route('accounts.show',[sourceAccount.id])~'">'~sourceAccount.name~'</a>') }}
|
||||
{{ ExpandedForm.staticText('destination_account_asset', '<a href="'~route('accounts.show',[destinationAccount.id])~'">'~destinationAccount.name~'</a>') }}
|
||||
{% endif %}
|
||||
|
||||
{# ONE #}
|
||||
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Deposit' %}
|
||||
<p><em>
|
||||
{{ trans('firefly.convert_explanation_withdrawal_deposit',
|
||||
{
|
||||
amount: positiveAmount|formatAmount,
|
||||
sourceRoute: route('accounts.show', [sourceAccount.id]),
|
||||
sourceName: sourceAccount.name,
|
||||
destinationRoute: route('accounts.show', [destinationAccount.id]),
|
||||
destinationName: destinationAccount.name,
|
||||
})|raw }}
|
||||
</em>
|
||||
</p>
|
||||
<p><em>
|
||||
{{ 'convert_please_set_revenue_source'|_ }}
|
||||
</em>
|
||||
</p>
|
||||
{% if destinationAccount.accountType.type == "Cash account" %}
|
||||
{{ ExpandedForm.text('source_account_revenue', '') }}
|
||||
{% else %}
|
||||
{{ ExpandedForm.text('source_account_revenue', destinationAccount.name) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{# TWO #}
|
||||
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Transfer' %}
|
||||
<p><em>
|
||||
{{ trans('firefly.convert_explanation_withdrawal_transfer',
|
||||
{
|
||||
amount: positiveAmount|formatAmount,
|
||||
sourceRoute: route('accounts.show', [sourceAccount.id]),
|
||||
sourceName: sourceAccount.name,
|
||||
destinationRoute: route('accounts.show', [destinationAccount.id]),
|
||||
destinationName: destinationAccount.name,
|
||||
})|raw }}
|
||||
</em></p>
|
||||
|
||||
<p>
|
||||
<em>
|
||||
{{ 'convert_please_set_asset_destination'|_ }}
|
||||
|
||||
</em>
|
||||
</p>
|
||||
{{ ExpandedForm.activeLongAccountList('destination_account_asset', null) }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{# THREE #}
|
||||
{% if sourceType.type == 'Deposit' and destinationType.type == 'Withdrawal' %}
|
||||
<p>
|
||||
<em>
|
||||
{{ trans('firefly.convert_explanation_deposit_withdrawal',
|
||||
{
|
||||
amount: positiveAmount|formatAmount,
|
||||
sourceRoute: route('accounts.show', [sourceAccount.id]),
|
||||
sourceName: sourceAccount.name,
|
||||
destinationRoute: route('accounts.show', [destinationAccount.id]),
|
||||
destinationName: destinationAccount.name,
|
||||
})|raw }}
|
||||
</em>
|
||||
</p>
|
||||
<p>
|
||||
<em>
|
||||
{{ 'convert_please_set_expense_destination'|_ }}
|
||||
|
||||
</em>
|
||||
</p>
|
||||
{% if sourceAccount.accountType.type == "Cash account" %}
|
||||
{{ ExpandedForm.text('destination_account_expense', '') }}
|
||||
{% else %}
|
||||
{{ ExpandedForm.text('destination_account_expense', destinationAccount.name) }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{# FOUR #}
|
||||
{% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}
|
||||
|
||||
<p>
|
||||
<em>
|
||||
{{ trans('firefly.convert_explanation_deposit_transfer',
|
||||
{
|
||||
amount: positiveAmount|formatAmount,
|
||||
sourceRoute: route('accounts.show', [sourceAccount.id]),
|
||||
sourceName: sourceAccount.name,
|
||||
destinationRoute: route('accounts.show', [destinationAccount.id]),
|
||||
destinationName: destinationAccount.name,
|
||||
})|raw }}
|
||||
</em>
|
||||
</p>
|
||||
<p>
|
||||
<em>
|
||||
{{ 'convert_please_set_asset_source'|_ }}
|
||||
|
||||
</em>
|
||||
</p>
|
||||
{{ ExpandedForm.activeLongAccountList('source_account_asset', null) }}
|
||||
{% endif %}
|
||||
|
||||
{# FIVE #}
|
||||
{% if sourceType.type == 'Transfer' and destinationType.type == 'Withdrawal' %}
|
||||
|
||||
<p>
|
||||
<em>
|
||||
{{ trans('firefly.convert_explanation_transfer_withdrawal',
|
||||
{
|
||||
amount: positiveAmount|formatAmount,
|
||||
sourceRoute: route('accounts.show', [sourceAccount.id]),
|
||||
sourceName: sourceAccount.name,
|
||||
destinationRoute: route('accounts.show', [destinationAccount.id]),
|
||||
destinationName: destinationAccount.name,
|
||||
})|raw }}
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<em>
|
||||
{{ 'convert_please_set_expense_destination'|_ }}
|
||||
</em>
|
||||
</p>
|
||||
|
||||
{{ ExpandedForm.text('destination_account_expense', destinationAccount.name) }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{# SIX #}
|
||||
{% if sourceType.type == 'Transfer' and destinationType.type == 'Deposit' %}
|
||||
|
||||
|
||||
<p>
|
||||
<em>
|
||||
{{ trans('firefly.convert_explanation_transfer_deposit',
|
||||
{
|
||||
amount: positiveAmount|formatAmount,
|
||||
sourceRoute: route('accounts.show', [sourceAccount.id]),
|
||||
sourceName: sourceAccount.name,
|
||||
destinationRoute: route('accounts.show', [destinationAccount.id]),
|
||||
destinationName: destinationAccount.name,
|
||||
})|raw }}
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<em>
|
||||
{{ 'convert_please_set_revenue_source'|_ }}
|
||||
</em>
|
||||
</p>
|
||||
|
||||
{{ ExpandedForm.text('source_account_revenue', sourceAccount.name) }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="{{ route('transactions.show', journal.id) }}" class="btn btn-danger">{{ 'cancel'|_ }}</a>
|
||||
<button type="submit" id="transaction-btn" class="btn btn-success pull-right">
|
||||
{{ trans('form.convert_'~sourceType.type) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/convert.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,79 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, what, start, end) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{# upper show-all instruction #}
|
||||
{% if periods.count > 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('transactions.index.all',[what]) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# list with journals #}
|
||||
<div class="row">
|
||||
<div class="{% if periods.count > 0 %}col-lg-10 col-md-10 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ subTitle }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div style="padding:8px;">
|
||||
{% if what == 'transfers' %}
|
||||
<a href="{{ route('transactions.create', 'transfer') }}" class="btn btn-success"><i class="fa fa-plus fa-fw"></i> {{ ('new_' ~ what)|_ }}</a>
|
||||
{% else %}
|
||||
<a href="{{ route('transactions.create', what) }}" class="btn btn-success"><i class="fa fa-plus fa-fw"></i> {{ ('new_' ~ what)|_ }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{# actual list #}
|
||||
{% if periods.count > 0 %}
|
||||
{# page is not "all"-overview#}
|
||||
{% include 'list.transactions' %}
|
||||
{% else %}
|
||||
{% include 'list.transactions' with {showCategories: true, showBudgets: true, showBill:true} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{# links for other views #}
|
||||
{% if periods.count > 0 %}
|
||||
<p>
|
||||
<i class="fa fa-calendar"></i>
|
||||
<a href="{{ route('transactions.index.all', [what]) }}">{{ 'show_all_no_filter'|_ }}</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
<i class="fa fa-calendar"></i>
|
||||
<a href="{{ route('transactions.index', [what]) }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# boxes with info #}
|
||||
{% if periods.count > 0 %}
|
||||
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
|
||||
{% include 'list.periods' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{# lower show-all instruction #}
|
||||
{% if periods.count > 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
|
||||
<p class="small text-center"><a href="{{ route('transactions.index.all',[what]) }}">{{ 'showEverything'|_ }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/ff/transactions/list.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, link) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="{{ route('transactions.link.destroy', [link.id]) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-6 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('firefly.delete_journal_link', {source: link.source.description, destination: link.destination.description, source_link: route('transactions.show', [link.source_id]) , destination_link: route('transactions.show',link.destination_id)})|raw }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="text-danger">
|
||||
{{ trans('form.permDeleteWarning') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ trans('form.journal_link_areYouSure', {source: link.source.description, destination: link.destination.description, source_link: route('transactions.show', [link.source_id]) , destination_link: route('transactions.show',link.destination_id)})|raw }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn pull-right btn-danger"/>
|
||||
<a href="{{ URL.previous() }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,70 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journals) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.mass.destroy') }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-8 coll-offset-md-2 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mass_delete_journals'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="text-danger">
|
||||
{{ trans('form.permDeleteWarning') }}
|
||||
{{ 'perm-delete-many'|_ }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ trans('form.mass_journal_are_you_sure') }}
|
||||
{{ trans('form.mass_make_selection') }}
|
||||
</p>
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{{ trans('list.description') }}</th>
|
||||
<th>{{ trans('list.total_amount') }}</th>
|
||||
<th class="hidden-sm hidden-xs">{{ trans('list.date') }}</th>
|
||||
<th class="hidden-xs">{{ trans('list.from') }}</th>
|
||||
<th class="hidden-xs">{{ trans('list.to') }}</th>
|
||||
</tr>
|
||||
{% for journal in journals %}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="confirm_mass_delete[]" value="{{ journal.id }}" checked/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ journal|journalTotalAmount }}
|
||||
</td>
|
||||
<td>
|
||||
{{ journal.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ sourceAccount(journal)|raw }}
|
||||
</td>
|
||||
<td>
|
||||
{{ destinationAccount(journal)|raw }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" name="submit" value="{{ trans('form.delete_all_permanently') }}" class="btn btn-danger pull-right"/>
|
||||
<a href="{{ route('index') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,142 +0,0 @@
|
||||
{% 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 }}">
|
||||
</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="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/mass/edit.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,468 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transaction_journal_information'|_ }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<div class="btn-group">
|
||||
<button id="transaction_menu" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{ route('transactions.edit',journal.id) }}"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete',journal.id) }}"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}</a></li>
|
||||
{# convert to withdrawal #}
|
||||
{% if journal.transactionType.type != "Withdrawal" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to deposit #}
|
||||
{% if journal.transactionType.type != "Deposit" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to transfer#}
|
||||
{% if journal.transactionType.type != "Transfer" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# other options #}
|
||||
<li>
|
||||
<a href="{{ route('transactions.clone', [journal.id]) }}">
|
||||
<i class="fa fa-copy fa-fw"></i> {{ ('clone_'~journal.transactionType.type|lower)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.split.edit', journal.id) }}">
|
||||
<i class="fa fa-unsorted fa-fw"></i> {{ ('split_this_'~what)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#linkJournalModal"><i
|
||||
class="fa fa-fw fa-link"></i> {{ 'link_transaction'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('list.type') }}</td>
|
||||
<td>{{ journal.transactiontype.type|_ }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('list.description') }}</td>
|
||||
<td>{{ journal.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'source_accounts'|_ }}</td>
|
||||
<td>{{ sourceAccount(journal)|raw }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'destination_accounts'|_ }}</td>
|
||||
<td>{{ destinationAccount(journal)|raw }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'total_amount'|_ }}</td>
|
||||
<td>
|
||||
{{ journal|journalTotalAmount }}
|
||||
|
||||
{# if more transactions, list each one: #}
|
||||
|
||||
{% if transactions|length > 2 %}
|
||||
({% for transaction in transactions %}
|
||||
{% if transaction.type == 'Deposit' and transaction.amount > 0 %}
|
||||
{{ transaction|transactionArrayAmount }}{% if loop.index != loop.length %}, {% endif %}
|
||||
{% endif %}
|
||||
{% if transaction.type == 'Withdrawal' and transaction.amount < 0 %}
|
||||
{{ transaction|transactionArrayAmount }}{% if loop.index != loop.length %}, {% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if transaction.type == 'Transfer' and transaction.amount > 0 %}
|
||||
{{ transaction|transactionArrayAmount }}{% if loop.index != loop.length %}, {% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %})
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%;">{{ trans('list.date') }}</td>
|
||||
<td>{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" href="{{ route('transactions.edit',journal.id) }}"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-cog fa-fw"></i> {{ 'options'|_ }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
{# convert to withdrawal #}
|
||||
{% if journal.transactionType.type != "Withdrawal" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to deposit #}
|
||||
{% if journal.transactionType.type != "Deposit" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to transfer#}
|
||||
{% if journal.transactionType.type != "Transfer" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# other options #}
|
||||
<li>
|
||||
<a href="{{ route('transactions.clone', [journal.id]) }}">
|
||||
<i class="fa fa-copy fa-fw"></i> {{ ('clone_'~journal.transactionType.type|lower)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.split.edit', journal.id) }}">
|
||||
<i class="fa fa-unsorted fa-fw"></i> {{ ('split_this_'~what)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#linkJournalModal"><i
|
||||
class="fa fa-fw fa-link"></i> {{ 'link_transaction'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-danger"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if journal.piggyBankEvents|length > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'piggyBanks'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
{% include 'list/piggy-bank-events' with {'events': events, 'showPiggyBank':true} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transaction_journal_meta'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ 'categories'|_ }}</td>
|
||||
<td>{{ journalCategories(journal)|raw }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'budgets'|_ }}</td>
|
||||
<td>{{ journalBudgets(journal)|raw }}</td>
|
||||
</tr>
|
||||
|
||||
{# all date meta values #}
|
||||
{% for dateField in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %}
|
||||
{% if journalHasMeta(journal, dateField) %}
|
||||
<tr>
|
||||
<td>{{ trans('list.'~dateField) }}</td>
|
||||
<td>{{ journalGetMetaDate(journal,dateField).formatLocalized(monthAndDayFormat) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{# all other meta values #}
|
||||
{% for metaField in ['external_id','bunq_payment_id','internal_reference','sepa-batch-id','sepa-ct-id','sepa-ct-op','sepa-db','sepa-country','sepa-cc','sepa-ep','sepa-ci'] %}
|
||||
{% if journalHasMeta(journal, metaField) %}
|
||||
<tr>
|
||||
<td>{{ trans('list.'~metaField) }}</td>
|
||||
<td>{{ journalGetMetaField(journal, metaField) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if journal.notes.count == 1 %}
|
||||
<tr>
|
||||
<td>{{ trans('list.notes') }}</td>
|
||||
<td class="markdown">{{ journal.notes.first.text|markdown }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if journal.bill %}
|
||||
<tr>
|
||||
<td>{{ 'bill'|_ }}</td>
|
||||
<td><a href="{{ route('bills.show', journal.bill_id) }}">{{ journal.bill.name }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if journal.tags|length > 0 %}
|
||||
<tr>
|
||||
<td>{{ 'tags'|_ }}</td>
|
||||
<td>
|
||||
{% for tag in journal.tags %}
|
||||
|
||||
<h4 style="display: inline;"><a class="label label-success" href="{{ route('tags.show',tag) }}">
|
||||
<i class="fa fa-fw fa-tag"></i>
|
||||
{{ tag.tag }}</a>
|
||||
</h4>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% if journal.attachments|length > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'attachments'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
{% for att in journal.attachments %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><i class="fa fa-pencil"></i></a>
|
||||
<a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><i class="fa fa-trash"></i></a>
|
||||
<a href="{{ route('attachments.download', att.id) }}" class="btn btn-default"><i class="fa fa-download"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<i class="fa {{ att.mime|mimeIcon }}"></i>
|
||||
<a href="{{ route('attachments.view', att.id) }}" title="{{ att.filename }}">
|
||||
{% if att.title %}
|
||||
{{ att.title }}
|
||||
{% else %}
|
||||
{{ att.filename }}
|
||||
{% endif %}
|
||||
</a>
|
||||
({{ att.size|filesize }})
|
||||
{% if att.notes.first %}
|
||||
{{ att.notes.first.text|markdown }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# show links: #}
|
||||
{% if links.count > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'journal_links'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
{% for link in links %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger"><i class="fa fa-trash"></i></a>
|
||||
<a href="{{ route('transactions.link.switch', [link.id]) }}" class="btn btn-default"><i
|
||||
class="fa fa-fw fa-arrows-h"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ ('this_'~(what|lower))|_ }}
|
||||
{% if link.source.id == journal.id %}
|
||||
{{ journalLinkTranslation('outward', link.linkType.outward) }}
|
||||
<a href="{{ route('transactions.show',link.destination.id) }}">
|
||||
#{{ link.destination.id }}: {{ link.destination.description }}
|
||||
</a>
|
||||
({{ link.destination|journalTotalAmount }})
|
||||
{% else %}
|
||||
{{ journalLinkTranslation('inward', link.linkType.inward) }}
|
||||
<a href="{{ route('transactions.show',link.source.id) }}">
|
||||
#{{ link.source.id }}: {{ link.source.description }}</a>
|
||||
({{ link.source|journalTotalAmount }})
|
||||
{% endif %}
|
||||
{% if link.notes.count == 1 %}
|
||||
<br/>
|
||||
{{ link.notes.first.text|markdown }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
{% endif %}
|
||||
</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 no-padding">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="hidden-md hidden-sm hidden-xs">{{ trans('list.description') }}</th>
|
||||
<th>{{ trans('list.source_account') }}</th>
|
||||
<th>{{ trans('list.destination_account') }}</th>
|
||||
<th>{{ trans('list.amount') }}</th>
|
||||
<th class="hidden-md hidden-xs">{{ trans('list.budget') }}</th>
|
||||
<th class="hidden-md hidden-xs">{{ trans('list.category') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% set maxIdentifier = ((transactions|length) / 2) -1 %}
|
||||
{% for x in 0..maxIdentifier %}
|
||||
<tr>
|
||||
{# loop each transaction in the array.#}
|
||||
{% for transaction in transactions %}
|
||||
{% if
|
||||
((transaction.type == 'Withdrawal') and transaction.identifier == x and transaction.amount < 0)
|
||||
or
|
||||
((transaction.type == 'Deposit' or transaction.type == 'Transfer') and transaction.identifier == x and transaction.amount > 0) %}
|
||||
<td class="hidden-md hidden-sm hidden-xs">
|
||||
{% if transaction.description == "" %}
|
||||
{{ journal.description }}
|
||||
{% else %}
|
||||
{{ transaction.description }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if transaction.source_type == 'Cash account' %}
|
||||
<span class="text-success">({{ 'cash'|_ }})</span>
|
||||
{% else %}
|
||||
<a href="{{ route('accounts.show', transaction.source_id) }}">{{ transaction.source_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if transaction.destination_type == 'Cash account' %}
|
||||
<span class="text-success">({{ 'cash'|_ }})</span>
|
||||
{% else %}
|
||||
<a href="{{ route('accounts.show', transaction.destination_id) }}">{{ transaction.destination_name }}</a>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{ transaction|transactionArrayAmount }}
|
||||
</td>
|
||||
<td class="hidden-md hidden-xs">
|
||||
{% if transaction.budget_id %}
|
||||
<a href="{{ route('budgets.show', transaction.budget_id) }}"
|
||||
title="{{ transaction.budget_name }}">{{ transaction.budget_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-md hidden-xs">
|
||||
{% if transaction.category_id %}
|
||||
<a href="{{ route('categories.show', transaction.category_id) }}"
|
||||
title="{{ transaction.category_name }}">{{ transaction.category_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# link journal modal:#}
|
||||
<div class="modal fade" tabindex="-1" role="dialog" id="linkJournalModal">
|
||||
<form action="{{ route('transactions.link.store', [journal.id]) }}" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'link_to_other_transaction'|_ }}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="helpBody">
|
||||
<p>{{ 'select_transaction_to_link'|_ }}</p>
|
||||
<div class="form-group">
|
||||
<label for="link_type" class="col-sm-2 control-label">{{ 'this_transaction'|_ }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="link_type" class="form-control" name="link_type">
|
||||
{% for linkType in linkTypes %}
|
||||
<option label="{{ journalLinkTranslation('inward', linkType.inward) }}" value="{{ linkType.id }}_inward">{{ journalLinkTranslation('inward', linkType.inward) }}</option>
|
||||
<option label="{{ journalLinkTranslation('outward', linkType.outward) }}" value="{{ linkType.id }}_outward">{{ journalLinkTranslation('outward', linkType.outward) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="link_other" class="col-sm-2 control-label">{{ 'transaction'|_ }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="link_other" autocomplete="off" id="link_other" value="" class="form-control">
|
||||
<p class="help-block">{{ 'to_link_not_found'|_ }}</p>
|
||||
<input type="hidden" name="link_journal_id" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes" class="col-sm-2 control-label">{{ 'notes'|_ }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="notes" name="notes" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ 'submit'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var autoCompleteUri = "{{ route('json.journals-with-id',[journal.id]) }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/show.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,260 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, what) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.store',what) }}" accept-charset="UTF-8" class="form-horizontal" id="store" enctype="multipart/form-data">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="what" value="{{ what }}"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">{{ 'quickswitch'|_ }}</label>
|
||||
|
||||
<div class="col-sm-8" id="switch-box">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<a href="#" data-what="withdrawal" class="switch btn btn-default"> {{ 'withdrawal'|_ }}</a>
|
||||
<a href="#" data-what="deposit" class="switch btn btn-default"> {{ 'deposit'|_ }}</a>
|
||||
<a href="#" data-what="transfer" class="switch btn btn-default">{{ 'transfer'|_ }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{# DESCRIPTION IS ALWAYS AVAILABLE #}
|
||||
{{ ExpandedForm.text('description') }}
|
||||
|
||||
{# SELECTABLE SOURCE ACCOUNT ONLY FOR WITHDRAWALS AND TRANSFERS #}
|
||||
{{ ExpandedForm.activeLongAccountList('source_id', null, {label: trans('form.asset_source_account') }) }}
|
||||
|
||||
{# FREE FORMAT SOURCE ACCOUNT ONLY FOR DEPOSITS #}
|
||||
{{ ExpandedForm.text('source_name', null, {label: trans('form.revenue_account')}) }}
|
||||
|
||||
{# FREE FORMAT DESTINATION ACCOUNT ONLY FOR EXPENSES #}
|
||||
{{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }}
|
||||
|
||||
{# SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS #}
|
||||
{{ ExpandedForm.activeLongAccountList('destination_id', null, {label: trans('form.asset_destination_account')} ) }}
|
||||
|
||||
{# ALWAYS SHOW AMOUNT #}
|
||||
<!-- A -->
|
||||
{{ ExpandedForm.amount('amount') }}
|
||||
<!-- B -->
|
||||
|
||||
{# INSTRUCTIONS FOR EXCHANGE RATES #}
|
||||
{{ ExpandedForm.staticText('exchange_rate_instruction','(here be text)') }}
|
||||
|
||||
{{ ExpandedForm.nonSelectableAmount('native_amount') }}
|
||||
|
||||
{{ ExpandedForm.nonSelectableAmount('source_amount') }}
|
||||
|
||||
{{ ExpandedForm.nonSelectableAmount('destination_amount') }}
|
||||
|
||||
{# ALWAYS SHOW DATE #}
|
||||
{{ ExpandedForm.date('date', preFilled.date|default(phpdate('Y-m-d'))) }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="transaction-btn btn btn-success pull-right">
|
||||
{{ trans('form.store_new_'~what) }}
|
||||
</button>
|
||||
</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">{{ 'optional_field_meta_data'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# BUDGET ONLY WHEN CREATING A WITHDRAWAL #}
|
||||
{% if budgets|length > 1 %}
|
||||
{{ ExpandedForm.select('budget_id', budgets, null) }}
|
||||
{% else %}
|
||||
{{ ExpandedForm.select('budget_id', budgets, null, {helpText: trans('firefly.no_budget_pointer', {link: route('budgets.index')})}) }}
|
||||
{% endif %}
|
||||
|
||||
{# CATEGORY ALWAYS #}
|
||||
{{ ExpandedForm.text('category') }}
|
||||
|
||||
{# TAGS #}
|
||||
{{ ExpandedForm.text('tags') }}
|
||||
|
||||
{# RELATE THIS TRANSFER TO A PIGGY BANK #}
|
||||
<!-- C -->
|
||||
{{ ExpandedForm.piggyBankList('piggy_bank_id', 0) }}
|
||||
<!-- D -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# explain if necessary #}
|
||||
{% if
|
||||
not optionalFields.interest_date or
|
||||
not optionalFields.book_date or
|
||||
not optionalFields.process_date or
|
||||
not optionalFields.due_date or
|
||||
not optionalFields.payment_date or
|
||||
not optionalFields.invoice_date or
|
||||
not optionalFields.internal_reference or
|
||||
not optionalFields.notes or
|
||||
not optionalFields.attachments %}
|
||||
<p class="text-center text-success"><i class="fa fa-info-circle"></i>
|
||||
<em>{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}</em></p>
|
||||
{% endif %}
|
||||
|
||||
{# box for dates #}
|
||||
{% if
|
||||
optionalFields.interest_date or optionalFields.book_date or optionalFields.process_date
|
||||
or optionalFields.due_date or optionalFields.payment_date
|
||||
or optionalFields.invoice_date %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_meta_dates'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{# INTEREST DATE #}
|
||||
{% if optionalFields.interest_date %}
|
||||
{{ ExpandedForm.date('interest_date') }}
|
||||
{% endif %}
|
||||
|
||||
{# BOOK DATE #}
|
||||
{% if optionalFields.book_date %}
|
||||
{{ ExpandedForm.date('book_date') }}
|
||||
{% endif %}
|
||||
|
||||
{# PROCESSING DATE #}
|
||||
{% if optionalFields.process_date %}
|
||||
{{ ExpandedForm.date('process_date') }}
|
||||
{% endif %}
|
||||
|
||||
{# DUE DATE #}
|
||||
{% if optionalFields.due_date %}
|
||||
{{ ExpandedForm.date('due_date') }}
|
||||
{% endif %}
|
||||
|
||||
{# PAYMENT DATE #}
|
||||
{% if optionalFields.payment_date %}
|
||||
{{ ExpandedForm.date('payment_date') }}
|
||||
{% endif %}
|
||||
|
||||
{# INVOICE DATE #}
|
||||
{% if optionalFields.invoice_date %}
|
||||
{{ ExpandedForm.date('invoice_date') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# box for business fields #}
|
||||
{% if optionalFields.internal_reference or optionalFields.notes %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_meta_business'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{# REFERENCE #}
|
||||
{% if optionalFields.internal_reference %}
|
||||
{{ ExpandedForm.text('internal_reference') }}
|
||||
{% endif %}
|
||||
|
||||
{# NOTES #}
|
||||
{% if optionalFields.notes %}
|
||||
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# box for attachments #}
|
||||
{% if optionalFields.attachments %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_attachments'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# ATTACHMENTS #}
|
||||
{% if optionalFields.attachments %}
|
||||
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('create','transaction') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="transaction-btn btn btn-success pull-right">
|
||||
{{ trans('form.store_new_'~what) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="source_account_currency" value="0" />
|
||||
<input type="hidden" name="destination_account_currency" value="0" />
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var what = "{{ what }}";
|
||||
|
||||
// some titles and names:
|
||||
var txt = [];
|
||||
var title = [];
|
||||
var breadcrumbs = [];
|
||||
var middleCrumbName = [];
|
||||
var middleCrumbUrl = [];
|
||||
var button = [];
|
||||
var exchangeRateInstructions = "{{ 'exchange_rate_instructions'|_|escape('js') }}";
|
||||
var transferInstructions = "{{ 'transfer_exchange_rate_instructions'|_|escape('js') }}";
|
||||
|
||||
{% for type in {0:'withdrawal',1:'deposit',2:'transfer'} %}
|
||||
|
||||
txt['{{ type }}'] = '{{ type|_ }}';
|
||||
title['{{ type }}'] = '{{ trans('form.add_new_' ~ type) }}';
|
||||
breadcrumbs['{{ type }}'] = '{{ trans('breadcrumbs.create_' ~ type) }}';
|
||||
middleCrumbName['{{ type }}'] = '{{ trans('breadcrumbs.' ~ type ~ '_list') }}';
|
||||
middleCrumbUrl['{{ type }}'] = '{{ route('transactions.index', type) }}';
|
||||
button['{{ type }}'] = '{{ trans('form.store_new_' ~ type) }}';
|
||||
{% endfor %}
|
||||
|
||||
// some code for the foreign amount logic:
|
||||
var useAccountCurrency = {% if preFilled.amount_currency_id_amount > 0 %}false{% else %}true{% endif %};
|
||||
var overruleCurrency = {{ preFilled.amount_currency_id_amount|default(0) }};
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"></script>
|
||||
|
||||
<script type="text/javascript" src="js/lib/modernizr-custom.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/jquery-ui.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="jscript/accounts?ext=.js&v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="jscript/currencies?ext=.js&v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/single/common.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/single/create.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
<link href="css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
{% endblock %}
|
||||
@@ -1,43 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.destroy',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-6 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('form.delete_journal', {'description': journal.description}) }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="text-danger">
|
||||
{{ trans('form.permDeleteWarning') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ trans('form.journal_areYouSure', {'description': journal.description}) }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger pull-right"/>
|
||||
{% if journal.transactiontype.type == 'Withdrawal' %}
|
||||
<a href="{{ route('transactions.index','withdrawal') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
{% endif %}
|
||||
{% if journal.transactiontype.type == 'Deposit' %}
|
||||
<a href="{{ route('transactions.index','deposit') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
{% endif %}
|
||||
{% if journal.transactiontype.type == 'Transfer' %}
|
||||
<a href="{{ route('transactions.index','transfers') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,272 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="id" value="{{ journal.id }}"/>
|
||||
<input type="hidden" name="what" value="{{ what }}"/>
|
||||
|
||||
{% if errors.all|length > 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="text-danger">{{ 'errors'|_ }}</h3>
|
||||
<ul>
|
||||
{% for err in errors.all %}
|
||||
<li class="text-danger">{{ err }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{# ALWAYS AVAILABLE #}
|
||||
{{ ExpandedForm.text('description',journal.description) }}
|
||||
|
||||
{# SELECTABLE SOURCE ACCOUNT ONLY FOR WITHDRAWALS AND TRANSFERS #}
|
||||
{% if what == 'transfer' or what == 'withdrawal' %}
|
||||
{{ ExpandedForm.longAccountList('source_id', data.source_id, {label: trans('form.asset_source_account')}) }}
|
||||
{% endif %}
|
||||
|
||||
{# FREE FORMAT SOURCE ACCOUNT ONLY FOR DEPOSITS #}
|
||||
{% if what == 'deposit' %}
|
||||
{{ ExpandedForm.text('source_name',data.source_name, {label: trans('form.revenue_account')}) }}
|
||||
{% endif %}
|
||||
|
||||
{# FREE FORMAT DESTINATION ACCOUNT ONLY FOR EXPENSES #}
|
||||
{% if what == 'withdrawal' %}
|
||||
{{ ExpandedForm.text('destination_name',data.destination_name, {label: trans('form.expense_account')}) }}
|
||||
{% endif %}
|
||||
|
||||
{# SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS #}
|
||||
{% if what == 'transfer' or what == 'deposit' %}
|
||||
{{ ExpandedForm.longAccountList('destination_id', data.destination_id, {label: trans('form.asset_destination_account')} ) }}
|
||||
{% endif %}
|
||||
|
||||
{# ALWAYS SHOW AMOUNT #}
|
||||
{{ ExpandedForm.amount('amount',data.amount, {'currency' : data.currency}) }}
|
||||
|
||||
{# INSTRUCTIONS FOR EXCHANGE RATES #}
|
||||
{{ ExpandedForm.staticText('exchange_rate_instruction','(here be text)') }}
|
||||
|
||||
{{ ExpandedForm.nonSelectableAmount('native_amount', data.native_amount, {currency: data.native_currency}) }}
|
||||
|
||||
{{ ExpandedForm.nonSelectableAmount('source_amount', data.source_amount, {currency: data.source_currency }) }}
|
||||
|
||||
{{ ExpandedForm.nonSelectableAmount('destination_amount', data.destination_amount, {currency: data.destination_currency }) }}
|
||||
|
||||
{# ALWAYS SHOW DATE #}
|
||||
{{ ExpandedForm.date('date',data['date']) }}
|
||||
</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">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if what == 'withdrawal' %}
|
||||
{% if budgetList|length > 1 %}
|
||||
{{ ExpandedForm.select('budget_id', budgetList, data['budget_id']) }}
|
||||
{% else %}
|
||||
{{ ExpandedForm.select('budget_id', budgetList, data['budget_id'], {helpText: trans('firefly.no_budget_pointer', {link: route('budgets.index')})}) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ ExpandedForm.text('category',data['category']) }}
|
||||
{{ ExpandedForm.text('tags') }}
|
||||
{# NO PIGGY BANK #}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if
|
||||
not optionalFields.interest_date or
|
||||
not optionalFields.book_date or
|
||||
not optionalFields.process_date or
|
||||
not optionalFields.due_date or
|
||||
not optionalFields.payment_date or
|
||||
not optionalFields.invoice_date or
|
||||
not optionalFields.internal_reference or
|
||||
not optionalFields.notes or
|
||||
not optionalFields.attachments %}
|
||||
<p class="text-center text-success"><i class="fa fa-info-circle"></i>
|
||||
<em>{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}</em></p>
|
||||
{% endif %}
|
||||
{% if
|
||||
optionalFields.interest_date or
|
||||
optionalFields.book_date or
|
||||
optionalFields.process_date or
|
||||
optionalFields.due_date or
|
||||
optionalFields.payment_date or
|
||||
optionalFields.invoice_date or
|
||||
data.interest_date or
|
||||
data.book_date or
|
||||
data.process_date or
|
||||
data.due_date or
|
||||
data.payment_date %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_meta_dates'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{% if optionalFields.interest_date or data['interest_date'] %}
|
||||
{{ ExpandedForm.date('interest_date',data['interest_date']) }}
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.book_date or data['book_date'] %}
|
||||
{{ ExpandedForm.date('book_date',data['book_date']) }}
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.process_date or data['process_date'] %}
|
||||
{{ ExpandedForm.date('process_date',data['process_date']) }}
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.due_date or data['due_date'] %}
|
||||
{{ ExpandedForm.date('due_date',data['due_date']) }}
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.payment_date or data['payment_date'] %}
|
||||
{{ ExpandedForm.date('payment_date',data['payment_date']) }}
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.invoice_date or data['invoice_date'] %}
|
||||
{{ ExpandedForm.date('invoice_date',data['invoice_date']) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if
|
||||
optionalFields.internal_reference or
|
||||
optionalFields.notes or
|
||||
data['interal_reference'] or
|
||||
data['notes'] %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_meta_business'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if optionalFields.internal_reference or data['interal_reference'] %}
|
||||
{{ ExpandedForm.text('internal_reference', data['interal_reference']) }}
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.notes or data['notes'] %}
|
||||
{{ ExpandedForm.textarea('notes', data['notes'], {helpText: trans('firefly.field_supports_markdown')}) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if optionalFields.attachments or journal.attachments|length > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_attachments'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if journal.attachments|length > 0 %}
|
||||
<div id="att_holder_attachments" class="form-group">
|
||||
<label class="col-sm-4 control-label">
|
||||
{{ trans('form.existing_attachments') }}
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
{% for att in journal.attachments %}
|
||||
<div class="row att_row" data-id="{{ att.id }}">
|
||||
<div class="col-lg-1"><a href="{{ route('attachments.delete', att.id) }}" data-id="{{ att.id }}" class="del_att btn btn-danger btn-xs"><i class="fa fa-trash"></i></a></div>
|
||||
<div class="col-lg-11">
|
||||
<a href="{{ route('attachments.view', att.id) }}" title="{{ att.filename }}">
|
||||
{% if att.title %}
|
||||
{{ att.title }} ({{ att.filename }})
|
||||
{% else %}
|
||||
{{ att.filename }}
|
||||
{% endif %}
|
||||
</a>
|
||||
({{ att.size|filesize }})
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</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('transactions.split.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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="source_account_currency" value="0"/>
|
||||
<input type="hidden" name="destination_account_currency" value="0"/>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var what = "{{ what }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/jquery-ui.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/modernizr-custom.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="jscript/accounts?ext=.js&v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="jscript/currencies?ext=.js&v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript">
|
||||
var journal = {{ journal.toArray()|json_encode|raw }};
|
||||
var journalData = {{ data|json_encode|raw }};
|
||||
var exchangeRateInstructions = "{{ 'exchange_rate_instructions'|_|escape('js') }}";
|
||||
var transferInstructions = "{{ 'transfer_exchange_rate_instructions'|_|escape('js') }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="js/ff/transactions/single/common.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/single/edit.js?v={{ FF_VERSION }}"></script>
|
||||
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link href="css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
{% endblock %}
|
||||
@@ -1,337 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.split.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
|
||||
enctype="multipart/form-data">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="id" value="{{ journal.id }}"/>
|
||||
<input type="hidden" name="what" value="{{ preFilled.what }}"/>
|
||||
<input type="hidden" name="journal_currency_id" value="{{ journal.transaction_currency_id }}"/>
|
||||
|
||||
{% if errors.all()|length > 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'errors'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<ul>
|
||||
{% for key, err in errors.all() %}
|
||||
<li class="text-danger">{{ err }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<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">{{ 'transaction_data'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{# DESCRIPTION IS ALWAYS AVAILABLE #}
|
||||
{{ ExpandedForm.text('journal_description', journal.description) }}
|
||||
|
||||
{# show source if withdrawal or transfer #}
|
||||
{% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
|
||||
{{ ExpandedForm.activeLongAccountList('journal_source_id', preFilled.journal_source_id) }}
|
||||
{% endif %}
|
||||
|
||||
{# show destination account id, if deposit (is asset): #}
|
||||
{% if preFilled.what == 'deposit' or preFilled.what == 'transfer' %}
|
||||
{{ ExpandedForm.activeLongAccountList('journal_destination_id', preFilled.journal_destination_id) }}
|
||||
{% endif %}
|
||||
|
||||
{# show amount and some helper text when making splits: #}
|
||||
{# amount #}
|
||||
<div id="journal_amount_holder" class="form-group">
|
||||
<label for="ffInput_journal_amount" class="col-sm-4 control-label">{{ trans('form.amount') }}</label>
|
||||
<div class="col-sm-8">
|
||||
<p id="ffInput_journal_amount" class="form-control-static">
|
||||
{{ formatAmountBySymbol(preFilled.journal_amount, preFilled.transactions[0].currency_symbol, preFilled.transactions[0].currency_dp) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# foreign amount, if not zero. #}
|
||||
{% if preFilled.journal_foreign_amount != 0 %}
|
||||
<div id="journal_foreign_amount_holder" class="form-group">
|
||||
<label for="ffInput_foreign_journal_amount" class="col-sm-4 control-label">{{ trans('form.foreign_amount') }}</label>
|
||||
<div class="col-sm-8">
|
||||
<p id="ffInput_foreign_journal_amount" class="form-control-static">
|
||||
{{ formatAmountBySymbol(preFilled.journal_foreign_amount, preFilled.transactions[0].foreign_currency_symbol, preFilled.transactions[0].foreign_currency_dp) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
|
||||
{# DATE #}
|
||||
{{ ExpandedForm.date('date', journal.date) }}
|
||||
</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">{{ 'optional_field_meta_data'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# ALWAYS TAGS #}
|
||||
{{ ExpandedForm.text('tags', preFilled.tags) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# EXPLANATION IF NECESSARY: #}
|
||||
{% if
|
||||
not optionalFields.interest_date or
|
||||
not optionalFields.book_date or
|
||||
not optionalFields.process_date or
|
||||
not optionalFields.due_date or
|
||||
not optionalFields.payment_date or
|
||||
not optionalFields.invoice_date or
|
||||
not optionalFields.internal_reference or
|
||||
not optionalFields.notes or
|
||||
not optionalFields.attachments %}
|
||||
<p class="text-center text-success"><i class="fa fa-info-circle"></i>
|
||||
<em>{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}</em></p>
|
||||
{% endif %}
|
||||
|
||||
{# BOX FOR DATES #}
|
||||
{% if
|
||||
optionalFields.interest_date or optionalFields.book_date or optionalFields.process_date
|
||||
or optionalFields.due_date or optionalFields.payment_date
|
||||
or optionalFields.invoice_date %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_meta_dates'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{# INTEREST DATE #}
|
||||
{% if optionalFields.interest_date or journal.interest_date %}
|
||||
{{ ExpandedForm.date('interest_date', journal.interest_date) }}
|
||||
{% endif %}
|
||||
|
||||
{# BOOK DATE #}
|
||||
{% if optionalFields.book_date or journal.book_date %}
|
||||
{{ ExpandedForm.date('book_date', journal.book_date) }}
|
||||
{% endif %}
|
||||
|
||||
{# PROCESSING DATE #}
|
||||
{% if optionalFields.process_date or journal.process_date %}
|
||||
{{ ExpandedForm.date('process_date', journal.process_date) }}
|
||||
{% endif %}
|
||||
|
||||
{# DUE DATE #}
|
||||
{% if optionalFields.due_date or journal.due_date %}
|
||||
{{ ExpandedForm.date('due_date', journal.due_date) }}
|
||||
{% endif %}
|
||||
|
||||
{# PAYMENT DATE #}
|
||||
{% if optionalFields.payment_date or journal.payment_date %}
|
||||
{{ ExpandedForm.date('payment_date', journal.payment_date) }}
|
||||
{% endif %}
|
||||
|
||||
{# INVOICE DATE #}
|
||||
{% if optionalFields.invoice_date or journal.invoice_date %}
|
||||
{{ ExpandedForm.date('invoice_date', journal.invoice_date) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# BOX FOR BUSINESS FIELDS #}
|
||||
{% if optionalFields.internal_reference or optionalFields.notes %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_meta_business'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{# INTERNAL REFERENCE #}
|
||||
{% if optionalFields.internal_reference or journal.internal_reference %}
|
||||
{{ ExpandedForm.text('internal_reference', journal.internal_reference) }}
|
||||
{% endif %}
|
||||
|
||||
{# NOTES #}
|
||||
{% if optionalFields.notes or journal.notes %}
|
||||
{{ ExpandedForm.textarea('notes',preFilled.notes) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# BOX FOR ATTACHMENTS #}
|
||||
{% if optionalFields.attachments %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optional_field_attachments'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# ATTACHMENTS #}
|
||||
{% if optionalFields.attachments %}
|
||||
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</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">{{ 'splits'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="container-fluid split_row_holder">
|
||||
<div class="row bg-gray-light" style="padding-bottom:3px;">
|
||||
{# HEADER #}
|
||||
<div class="col-lg-1 col-md-1 col-sm-6 col-xs-6"><strong>{{ trans('list.split_number') }}</strong></div>
|
||||
<div class="col-lg-3 col-md-5 col-sm-12 col-xs-12"><strong>{{ trans('list.description') }}</strong></div>
|
||||
{# withdrawal and deposit have a destination. #}
|
||||
{% if preFilled.what == 'withdrawal' %}
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12"><strong>{{ trans('list.destination') }}</strong></div>
|
||||
{% endif %}
|
||||
{# Deposit has a source #}
|
||||
{% if preFilled.what == 'deposit' %}
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12"><strong>{{ trans('list.source') }}</strong></div>
|
||||
{% endif %}
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12"><strong>{{ trans('list.amount') }}</strong></div>
|
||||
{# only withdrawal has budget #}
|
||||
{% if preFilled.what == 'withdrawal' %}
|
||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12"><strong>{{ trans('list.budget') }}</strong></div>
|
||||
{% endif %}
|
||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12"><strong>{{ trans('list.category') }}</strong></div>
|
||||
</div>
|
||||
|
||||
{# ROWS #}
|
||||
|
||||
|
||||
{% for index, transaction in preFilled.transactions %}
|
||||
<div class="row {% if loop.index0 % 2 == 1 %}bg-gray-light{% endif %} split_row" data-split="{{ loop.index0 }}">
|
||||
{# button #}
|
||||
<div class="col-lg-1 col-md-1 col-sm-6 col-xs-6">
|
||||
<a href="#" class="btn btn-xs btn-danger remove-current-split" data-split="{{ loop.index0 }}">
|
||||
<i class="fa fa-trash" data-split="{{ loop.index0 }}"></i><span> #{{ loop.index }}</span></a>
|
||||
</div>
|
||||
|
||||
{# description #}
|
||||
<div class="col-lg-3 col-md-5 col-sm-12 col-xs-12">
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][transaction_description]"
|
||||
value="{{ transaction.transaction_description }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
|
||||
{# destination for withdrawals: #}
|
||||
{% if preFilled.what == 'withdrawal' %}
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][destination_name]"
|
||||
value="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# source for deposits #}
|
||||
{% if preFilled.what == 'deposit' %}
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][source_name]"
|
||||
value="{{ transaction.source_name }}" class="form-control"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# amount#}
|
||||
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
|
||||
{{ transaction.currency_symbol }} <input class="split_amount_input" type="number"
|
||||
name="transactions[{{ loop.index0 }}][amount]"
|
||||
value="{{ transaction.amount }}"
|
||||
autocomplete="off" step="any">
|
||||
{% if transaction.foreign_amount != null %}
|
||||
{{ transaction.foreign_currency_symbol }} <input class="split_amount_input" type="number"
|
||||
name="transactions[{{ loop.index0 }}][foreign_amount]"
|
||||
value="{{ transaction.foreign_amount }}" autocomplete="off"
|
||||
step="any">
|
||||
<input type="hidden" name="transactions[{{ loop.index0 }}][foreign_currency_id]"
|
||||
value="{{ transaction.foreign_currency_id }}">
|
||||
{% endif %}
|
||||
<input type="hidden" name="transactions[{{ loop.index0 }}][transaction_currency_id]"
|
||||
value="{{ transaction.currency_id }}">
|
||||
</div>
|
||||
{# budget #}
|
||||
{% if preFilled.what == 'withdrawal' %}
|
||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
||||
<select class="form-control" name="transactions[{{ loop.index0 }}][budget_id]">
|
||||
{% for key, budget in budgets %}
|
||||
<option label="{{ budget }}" value="{{ key }}"
|
||||
{% if transaction.budget_id == key %} selected="selected"{% endif %}>{{ budget }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# category #}
|
||||
<div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
|
||||
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][category_name]"
|
||||
value="{{ transaction.category_name }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p>
|
||||
<br/>
|
||||
<a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('update','split-transaction') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ preFilled.what)|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link href="css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="{{ route('javascript.currencies') }}?ext=.js&v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript">
|
||||
var currencySymbol = "{{ preFilled.transactions[0].currency_symbol }}";
|
||||
var foreignCurrencySymbol = "{{ preFilled.transactions[0].foreign_currency_symbol }}";
|
||||
var originalSum = {{ preFilled.journal_amount }};
|
||||
var originalForeignSum = {{ preFilled.journal_foreign_amount }};
|
||||
var what = "{{ preFilled.what }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/bootstrap-tagsinput.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/jquery-ui.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/modernizr-custom.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/split/edit.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user