Files
firefly-iii/resources/views/transactions/show.twig

558 lines
32 KiB
Twig
Raw Normal View History

2022-01-29 14:19:01 +01:00
{% extends './layout/default' %}
2022-01-29 14:15:34 +01:00
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, transactionGroup) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transaction_journal_information'|_ }}</h3>
<div class="btn-group btn-group-xs pull-right">
2023-06-21 05:55:57 +02:00
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
2022-01-29 14:15:34 +01:00
</button>
<ul class="dropdown-menu">
{# edit + delete #}
2023-06-21 05:55:57 +02:00
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
2023-06-21 05:55:57 +02:00
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
<li role="separator" class="divider"></li>
{# convert to different type #}
{% if groupArray.transactions[0].type != 'withdrawal' %}
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span
class="fa fa-exchange"></span> {{ 'convert_to_withdrawal'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
{% endif %}
{% if groupArray.transactions[0].type != 'deposit' %}
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span
class="fa fa-exchange"></span> {{ 'convert_to_deposit'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
{% endif %}
{% if groupArray.transactions[0].type != 'transfer' %}
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span
class="fa fa-exchange"></span> {{ 'convert_to_transfer'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
{% endif %}
{# clone #}
{% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %}
<li role="separator" class="divider"></li>
2023-06-21 05:55:57 +02:00
<li><a href="#" class="clone-transaction" data-id="{{ transactionGroup.id }}"><span
class="fa fa-copy"></span> {{ 'clone'|_ }}</a></li>
2023-10-21 07:38:08 +02:00
<li><a href="#" class="clone-transaction-and-edit" data-id="{{ transactionGroup.id }}"><span
class="fa fa-copy"></span> {{ 'clone_and_edit'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
{% endif %}
</ul>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tbody>
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ trans('list.type') }}</td>
2022-01-29 14:15:34 +01:00
<td>{{ first.transactiontype.type|_ }}</td>
</tr>
<tr>
<td>{{ trans('list.description') }}</td>
<td>
{% if splits == 1 %}
{{ first.description }}
{% else %}
{{ transactionGroup.title }}
{% endif %}
</td>
</tr>
<tr>
<td style="width:30%;">{{ trans('list.date') }}</td>
<td>
2022-03-27 20:33:25 +02:00
{{ first.date.isoFormat(dateTimeFormat) }}
2024-11-09 12:19:01 +01:00
{% if(first.date_tz != '') %}
({{ first.date_tz }})
{% endif %}
2022-01-29 14:15:34 +01:00
</td>
</tr>
</tbody>
</table>
</div>
</div>
2023-06-21 05:55:57 +02:00
{% if groupLogEntries|length > 0 %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ 'audit_log_entries'|_ }}
</h3>
</div>
<div class="box-body no-padding">
{% include 'list.ale' with {logEntries: groupLogEntries} %}
</div>
</div>
{% endif %}
2022-01-29 14:15:34 +01:00
</div>
<div class="col-lg-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transaction_journal_meta'|_ }}</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tbody>
{% if first.transactiontype.type != 'Withdrawal' or splits == 1 %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">
2022-01-29 14:15:34 +01:00
{{ trans_choice('firefly.source_accounts', accounts['source']|length ) }}
</td>
<td>
{% for account in accounts['source'] %}
{% if 'Cash account' == account.type %}
<span class="text-success">({{ 'cash'|_ }})</span>
{% else %}
<a href="{{ route('accounts.show',account.id) }}"
title="{{ account.iban|default(account.name) }}">
{{ account.name }}
</a>
{% endif %}
{% if loop.index0 != accounts['source']|length -1 %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endif %}
{% if first.transactiontype.type != 'Deposit' or splits == 1 %}
<tr>
<td>
{{ trans_choice('firefly.destination_accounts', accounts['destination']|length ) }}
</td>
<td>
{% for account in accounts['destination'] %}
{% if 'Cash account' == account.type %}
<span class="text-success">({{ 'cash'|_ }})</span>
{% else %}
<a href="{{ route('accounts.show',account.id) }}"
title="{{ account.iban|default(account.name) }}">
{{ account.name }}
</a>
{% endif %}
{% if loop.index0 != accounts['destination']|length -1 %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endif %}
<tr>
<td style="width:30%;">{{ 'total_amount'|_ }}</td>
<td>
{% for amount in amounts %}
{% if first.transactiontype.type == 'Withdrawal' %}
2022-01-29 14:15:34 +01:00
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
{% elseif first.transactiontype.type == 'Deposit' %}
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
2022-01-29 14:15:34 +01:00
{% elseif first.transactiontype.type == 'Transfer' %}
2023-03-25 11:33:42 +01:00
<span class="text-info money-transfer">
2022-01-29 14:15:34 +01:00
{{ formatAmountBySymbol(amount.amount, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
</span>
{% elseif first.transactiontype.type == 'Opening balance' %}
{# Opening balance stored amount is always negative: find out which way the money goes #}
{% if groupArray.transactions[0].source_type == 'Initial balance account' %}
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}
{% else %}
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}
{% endif %}
{% endif %}
{% endfor %}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
</div>
{% if splits > 1 %}
<div class="row">
<div class="col-lg-12">
<h3>{{ 'splits'|_ }}</h3>
</div>
</div>
{% endif %}
{% set boxSize=6 %}
{% if(splits == 2) %}
{% set boxSize=6 %}
{% endif %}
{% if (splits > 2) %}
{% set boxSize = 4 %}
{% endif %}
<div class="row">
{% for index,journal in groupArray.transactions %}
<div class="col-lg-{{ boxSize }}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ journal.description }}
{% if journal.reconciled %}
<span class="fa fa-check"></span>
{% endif %}
{% if splits > 1 %}
<small>
{{ index+1 }} / {{ splits }}
</small>
{% endif %}
</h3>
<div class="btn-group btn-group-xs pull-right">
2023-06-21 05:55:57 +02:00
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
2022-01-29 14:15:34 +01:00
</button>
<ul class="dropdown-menu">
{# edit + delete #}
2023-06-21 05:55:57 +02:00
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
2023-06-21 05:55:57 +02:00
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
{% if journal.reconciled %}
<li><a class="reconcile-button" href="{{ route('transactions.unreconcile', [journal.transaction_journal_id]) }}"><span
class="fa fa-history"></span> {{ 'unreconcile'|_ }}</a></li>
{% endif %}
2022-01-29 14:15:34 +01:00
<li role="separator" class="divider"></li>
{# convert to different type #}
{% if groupArray.transactions[0].type != 'withdrawal' %}
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span
class="fa fa-exchange"></span> {{ 'convert_to_withdrawal'|_ }}</a>
2023-06-21 05:55:57 +02:00
</li>
2022-01-29 14:15:34 +01:00
{% endif %}
{% if groupArray.transactions[0].type != 'deposit' %}
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span
class="fa fa-exchange"></span> {{ 'convert_to_deposit'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
{% endif %}
{% if groupArray.transactions[0].type != 'transfer' %}
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span
class="fa fa-exchange"></span> {{ 'convert_to_transfer'|_ }}</a>
2023-06-21 05:55:57 +02:00
</li>
2022-01-29 14:15:34 +01:00
{% endif %}
{# clone #}
{% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %}
<li role="separator" class="divider"></li>
2023-06-21 05:55:57 +02:00
<li><a href="#" data-id="{{ transactionGroup.id }}" class="clone-transaction"><span
class="fa fa-copy"></span> {{ 'clone'|_ }}</a></li>
2023-10-21 07:38:08 +02:00
<li><a href="#" data-id="{{ transactionGroup.id }}" class="clone-transaction-and-edit"><span
class="fa fa-copy"></span> {{ 'clone_and_edit'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
{% endif %}
2023-06-21 05:55:57 +02:00
<li><a href="#" class="link-modal"
data-journal="{{ journal.transaction_journal_id }}"><span
class="fa fa-fw fa-link"></span>{{ 'link_transaction'|_ }}</a></li>
2022-01-29 14:15:34 +01:00
<li role="separator" class="divider"></li>
2023-06-21 05:55:57 +02:00
<li>
<a href="{{ route('rules.create-from-journal', [journal.transaction_journal_id]) }}"><span
class="fa fa-fw fa-random"></span>{{ 'create_rule_from_transaction'|_ }}
2023-06-21 05:55:57 +02:00
</a></li>
<li>
<a href="{{ route('recurring.create-from-journal', [journal.transaction_journal_id]) }}"><span
class="fa fa-fw fa-paint-brush"></span>{{ 'create_recurring_from_transaction'|_ }}
2023-06-21 05:55:57 +02:00
</a></li>
2022-01-29 14:15:34 +01:00
</ul>
</div>
</div>
<div class="box-body no-padding">
<table class="table">
<tr>
<td colspan="2">
2023-06-21 05:55:57 +02:00
2022-01-29 14:15:34 +01:00
<!-- type is: "{{ first.transactiontype.type }}" -->
{% if 'Cash account' == journal.source_type %}
<span class="text-success">({{ 'cash'|_ }})</span>
{% else %}
<a href="{{ route('accounts.show', journal.source_id) }}"
title="{{ journal.source_iban|default(journal.source_name) }}">{{ journal.source_name }}</a> &rarr;
{% endif %}
2023-06-21 05:55:57 +02:00
{% if first.transactiontype.type == 'Withdrawal' %}
2022-01-29 14:15:34 +01:00
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}
2023-06-21 05:55:57 +02:00
{% elseif first.transactiontype.type == 'Deposit' %}
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }}
2022-01-29 14:15:34 +01:00
{% elseif first.transactiontype.type == 'Transfer' or first.transactiontype.type == 'Opening balance' %}
2023-03-25 11:33:42 +01:00
<span class="text-info money-transfer">
2022-01-29 14:15:34 +01:00
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }}
</span>
{% elseif first.transactiontype.type == 'Liability credit' %}
2023-03-25 11:33:42 +01:00
<span class="text-info money-transfer">
2022-01-29 14:15:34 +01:00
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
</span>
{% endif %}
<!-- do foreign amount -->
{% if null != journal.foreign_amount %}
{% if first.transactiontype.type == 'Withdrawal' %}
2022-01-29 14:15:34 +01:00
({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }})
{% elseif first.transactiontype.type == 'Deposit' %}
({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }})
2022-01-29 14:15:34 +01:00
{% elseif first.transactiontype.type == 'Transfer' %}
2023-03-25 11:33:42 +01:00
<span class="text-info money-transfer">
2022-01-29 14:15:34 +01:00
({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
</span>
{% endif %}
{% endif %}
&rarr;
{% if 'Cash account' == journal.destination_type %}
<span class="text-success">({{ 'cash'|_ }})</span>
{% else %}
<a href="{{ route('accounts.show', journal.destination_id) }}"
title="{{ journal.destination_iban|default(journal.destination_name) }}">{{ journal.destination_name }}</a>
{% endif %}
</td>
</tr>
{% if null != journal.category_id %}
<tr>
<td style="width:30%;">{{ 'category'|_ }}</td>
2023-06-21 05:55:57 +02:00
<td>
<a href="{{ route('categories.show', [journal.category_id]) }}">{{ journal.category_name }}</a>
</td>
2022-01-29 14:15:34 +01:00
</tr>
{% endif %}
{% if null != journal.budget_id and first.transactiontype.type == 'Withdrawal' %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ 'budget'|_ }}</td>
2023-06-21 05:55:57 +02:00
<td>
<a href="{{ route('budgets.show', [journal.budget_id]) }}">{{ journal.budget_name }}</a>
</td>
2022-01-29 14:15:34 +01:00
</tr>
{% endif %}
{% if null != journal.bill_id and first.transactiontype.type == 'Withdrawal' %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ 'bill'|_ }}</td>
2023-06-21 05:55:57 +02:00
<td>
<a href="{{ route('bills.show', [journal.bill_id]) }}">{{ journal.bill_name }}</a>
</td>
2022-01-29 14:15:34 +01:00
</tr>
{% endif %}
<!-- other fields -->
{% for dateField in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %}
{% if journalHasMeta(journal.transaction_journal_id, dateField) %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ trans('list.'~dateField) }}</td>
2022-03-27 20:33:25 +02:00
<td>{{ journalGetMetaDate(journal.transaction_journal_id, dateField).isoFormat(monthAndDayFormat) }}</td>
2022-01-29 14:15:34 +01:00
</tr>
{% endif %}
{% endfor %}
{% 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','external_url'] %}
{% if journalHasMeta(journal.transaction_journal_id, metaField) %}
<tr>
<td>{{ trans('list.'~metaField) }}</td>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">
2023-06-21 05:55:57 +02:00
{% if 'external_url' == metaField %}
2022-04-12 18:19:30 +02:00
{% set url = journalGetMetaField(journal.transaction_journal_id, metaField) %}
<a href="{{ url }}" rel="noopener noreferrer nofollow" target="_blank">
{% if url|length > 60 %}
{{ url|slice(0, 60) ~ '...' }}
2022-01-29 14:15:34 +01:00
{% else %}
2022-04-12 18:19:30 +02:00
{{ url }}
2022-01-29 14:15:34 +01:00
{% endif %}
</a>
{% endif %}
2023-06-21 05:55:57 +02:00
{% if 'external_url' != metaField %}
2022-01-29 14:15:34 +01:00
{{ journalGetMetaField(journal.transaction_journal_id, metaField) }}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
{% if null != journal.notes and '' != journal.notes %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ trans('list.notes') }}</td>
2022-01-29 14:15:34 +01:00
<td class="markdown">{{ journal.notes|default('')|markdown }}</td>
</tr>
{% endif %}
2023-06-21 05:55:57 +02:00
{% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %}
2022-01-29 14:15:34 +01:00
{% set recurringTotal = journalGetMetaField(journal.transaction_journal_id, 'recurring_total') %}
{% if 0 == recurringTotal %}
{% set recurringTotal = '∞' %}
{% endif %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ trans('list.recurring_transaction') }}</td>
2022-01-29 14:15:34 +01:00
<td>{{ trans('firefly.recurring_info', {total: recurringTotal, count: journalGetMetaField(journal.transaction_journal_id, 'recurring_count') }) }}</td>
</tr>
{% endif %}
{% if journal.tags|length > 0 %}
<tr>
2022-10-02 14:37:50 +02:00
<td style="width:40%;">{{ 'tags'|_ }}</td>
2022-01-29 14:15:34 +01:00
<td>
{% for tag in journal.tags %}
2023-06-21 05:55:57 +02:00
<h4 style="display: inline;"><a class="label label-success"
href="{{ route('tags.show', tag.id) }}">
2022-01-29 14:15:34 +01:00
<span class="fa fa-fw fa-tag"></span>{{ tag.tag }}</a>
</h4>
{% endfor %}
</td>
</tr>
{% endif %}
</table>
</div>
</div>
<!-- Transaction links -->
{% if links[journal.transaction_journal_id]|length > 0 %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ 'journal_links'|_ }}
</h3>
</div>
<div class="box-body no-padding">
<table class="table">
{% for link in links[journal.transaction_journal_id] %}
<tr>
<td style="width:120px;">
<div class="btn-group btn-group-xs">
<a href="#" class="btn btn-default switch-link" data-id="{{ link.id }}"><span
class="fa fa-fw fa-arrows-h"></span></a>
2023-06-21 05:55:57 +02:00
<a href="{{ route('transactions.link.delete', [link.id]) }}"
class="btn btn-danger"><span class="fa fa-trash"></span></a>
2022-01-29 14:15:34 +01:00
</div>
</td>
<td>
{% if link.editable %}
2023-06-21 05:55:57 +02:00
{{ link.link }}
2022-01-29 14:15:34 +01:00
{% else %}
{{ trans('firefly.'~link.link) }}
2023-06-21 05:55:57 +02:00
{% endif %}
2022-01-29 14:15:34 +01:00
"<a href="{{ route('transactions.show', link.group) }}"
2023-06-21 05:55:57 +02:00
title="{{ link.description }}">{{ link.description }}</a>"
2022-01-29 14:15:34 +01:00
({{ link.amount|raw }})
{% if '' != link.foreign_amount %}
({{ link.foreign_amount|raw }})
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endif %}
<!-- Attachments -->
{% if attachments[journal.transaction_journal_id]|length > 0 %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'attachments'|_ }}</h3>
</div>
<div class="box-body no-padding">
2022-01-29 14:17:25 +01:00
{% include 'list.attachments' with {attachments: attachments[journal.transaction_journal_id]} %}
2022-01-29 14:15:34 +01:00
</div>
</div>
{% endif %}
<!-- Piggy bank events -->
{% if events[journal.transaction_journal_id]|length > 0 %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'piggy_events'|_ }}</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
{% for event in events[journal.transaction_journal_id] %}
<tr>
<td style="width:30%;">{{ event.amount|raw }}</td>
<td>
2023-06-21 05:55:57 +02:00
<a href="{{ route('piggy-banks.show', [event.piggy_id]) }}">{{ event.piggy }}</a>
</td>
2022-01-29 14:15:34 +01:00
</tr>
{% endfor %}
</table>
</div>
</div>
{% endif %}
2022-10-02 14:37:50 +02:00
{% if logEntries[journal.transaction_journal_id]|length > 0 %}
2023-06-21 05:55:57 +02:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ 'audit_log_entries'|_ }}
</h3>
</div>
<div class="box-body no-padding">
{% include 'list.ale' with {logEntries: logEntries[journal.transaction_journal_id]} %}
</div>
2022-10-02 14:37:50 +02:00
</div>
{% endif %}
2022-01-29 14:15:34 +01:00
</div>
{% endfor %}
</div>
{# modal for linking journals. Will be filled by AJAX #}
<div class="modal fade" tabindex="-1" role="dialog" id="linkJournalModal">
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}">
2022-04-12 18:19:30 +02:00
var modalDialogURL = '{{ route('transactions.link.modal', ['%JOURNAL%']) }}';
var acURL = '{{ route('api.v1.autocomplete.transactions-with-id') }}';
var groupURL = '{{ route('transactions.show',['%GROUP%']) }}';
2022-01-29 14:15:34 +01:00
var cloneGroupUrl = '{{ route('transactions.clone') }}';
2023-10-21 07:38:08 +02:00
var cloneAndEditUrl = '{{ route('transactions.clone') }}?redirect=edit';
2022-01-29 14:15:34 +01:00
2022-01-29 14:15:34 +01:00
$('.switch-link').on('click', switchLink);
$('.reconcile-button').on('click', unreconcile);
2022-01-29 14:15:34 +01:00
var switchLinkUrl = '{{ route('transactions.link.switch') }}';
2023-06-21 05:55:57 +02:00
function unreconcile(e) {
e.preventDefault();
var obj = $(e.currentTarget);
$.post(obj.attr('href'), {
_token: token
}).done(function () {
location.reload();
}).fail(function () {
console.error('I failed :(');
});
return false
}
2022-01-29 14:15:34 +01:00
function switchLink(e) {
e.preventDefault();
var obj = $(e.currentTarget);
$.post(switchLinkUrl, {
_token: token,
id: obj.data('id')
}).done(function () {
location.reload();
}).fail(function () {
console.error('I failed :(');
});
//alert(obj.data('id'));
return false
}
</script>
2023-06-21 05:55:57 +02:00
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/transactions/show.js?v={{ FF_VERSION }}"
nonce="{{ JS_NONCE }}"></script>
2022-01-29 14:15:34 +01:00
{% endblock %}