Skip to content

Firefly III: a personal finances manager

New views

Sander Dorigo00b834f5c4a6
diff --git a/app/Helpers/Functions/helpers.php b/app/Helpers/Functions/helpers.php
index 8210d79e44..adf427e22c 100644
--- a/app/Helpers/Functions/helpers.php
+++ b/app/Helpers/Functions/helpers.php
@@ -201,6 +201,18 @@ if (!function_exists('string_is_equal')) {
}
}
+if(!function_exists('format_amount_by_account')) {
+ function format_amount_by_account (Account $account, string $amount, ?bool $coloured = null): string {
+ $coloured ??= true;
+
+ /** @var AccountRepositoryInterface $accountRepos */
+ $accountRepos = app(AccountRepositoryInterface::class);
+ $currency = $accountRepos->getAccountCurrency($account) ?? Amount::getPrimaryCurrency();
+
+ return Amount::formatAnything($currency, $amount, $coloured);
+ }
+}
+
if (!function_exists('blade_escape_js')) {
function blade_escape_js(string $string): string
{
diff --git a/app/View/Components/Elements/TransactionAmount.php b/app/View/Components/Elements/TransactionAmount.php
index 88ad6f3b49..e3b184f3e7 100644
--- a/app/View/Components/Elements/TransactionAmount.php
+++ b/app/View/Components/Elements/TransactionAmount.php
@@ -16,17 +16,19 @@ class TransactionAmount extends Component
public array $foreign;
public ?string $pcAmount;
public ?Account $account;
+ public string $sourceAccountType;
/**
* Create a new component instance.
*/
- public function __construct(string $type, array $amount, array $foreign, ?string $pcAmount, ?Account $account)
+ public function __construct(string $type, array $amount, array $foreign, string $sourceAccountType, ?string $pcAmount, ?Account $account)
{
$this->type = $type;
$this->amount = $amount;
$this->foreign = $foreign;
$this->account = $account;
$this->pcAmount = $pcAmount;
+ $this->sourceAccountType = $sourceAccountType;
}
/**
diff --git a/resources/views/accounts/reconcile/overview.twig b/resources/views/accounts/reconcile/overview.blade.php
similarity index 51%
rename from resources/views/accounts/reconcile/overview.twig
rename to resources/views/accounts/reconcile/overview.blade.php
index f2144a6a9a..90c6d1c618 100644
--- a/resources/views/accounts/reconcile/overview.twig
+++ b/resources/views/accounts/reconcile/overview.blade.php
@@ -1,81 +1,80 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span>&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
+ <button type="button" class="close" data-dismiss="modal"><span>&times;</span><span class="sr-only">{{ __('firefly.close') }}</span>
</button>
<h4 class="modal-title">
- {{ 'overview_of_reconcile_modal'|_ }}
+ {{ __('firefly.overview_of_reconcile_modal') }}
</h4>
</div>
- <form class="form-horizontal inline" id="income" action="{{ route }}" method="POST">
+ <form class="form-horizontal inline" id="income" action="{{ $route }}" method="POST">
<div class="modal-body">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
- <input type="hidden" name="start" value="{{ start.format('Y-m-d') }}"/>
- <input type="hidden" name="end" value="{{ end.format('Y-m-d') }}"/>
- <input type="hidden" name="startBalance" value="{{ startBalance }}"/>
- <input type="hidden" name="endBalance" value="{{ endBalance }}"/>
- {% for id in selectedIds %}
- <input type="hidden" name="journals[]" value="{{ id }}"/>
+ <input type="hidden" name="start" value="{{ $start->format('Y-m-d') }}"/>
+ <input type="hidden" name="end" value="{{ $start->format('Y-m-d') }}"/>
+ <input type="hidden" name="startBalance" value="{{ $startBalance }}"/>
+ <input type="hidden" name="endBalance" value="{{ $endBalance }}"/>
+ @foreach($selectedIds as $id)
+ <input type="hidden" name="journals[]" value="{{ $id }}"/>
@endforeach
<table class="table table-striped table-bordered">
<tr>
- <td>{{ 'submitted_start_balance'|_ }} ({{ start.isoFormat($monthAndDayFormat) }})</td>
- <td>{{ formatAmountByAccount(account, startBalance) }}</td>
+ <td>{{ __('firefly.submitted_start_balance') }} ({{ $start->isoFormat($monthAndDayFormat) }})</td>
+ <td>{!! format_amount_by_account($account, $startBalance) !!} </td>
</tr>
<tr>
- <td>{{ trans('firefly.selected_transactions', {count: selectedIds|length}) }}</td>
- <td>{{ formatAmountByAccount(account, amount) }}</td>
+ <td>{{ trans('firefly.selected_transactions', ['count'=> count($selectedIds)]) }}</td>
+ <td>{!! format_amount_by_account($account, $amount) !!} </td>
</tr>
<tr>
- <td>{{ trans('firefly.already_cleared_transactions', {count: countCleared}) }}</td>
- <td>{{ formatAmountByAccount(account, clearedAmount) }}</td>
+ <td>{{ trans('firefly.already_cleared_transactions', ['count' => $countCleared]) }}</td>
+ <td>{!! format_amount_by_account($account, $clearedAmount) !!} </td>
</tr>
<tr>
- <td>{{ 'submitted_end_balance'|_ }} ({{ end.isoFormat($monthAndDayFormat) }})</td>
- <td>{{ formatAmountByAccount(account, endBalance) }}</td>
+ <td>{{ __('firefly.submitted_end_balance') }} ({{ $end->isoFormat($monthAndDayFormat) }})</td>
+ <td>{!! format_amount_by_account($account, $endBalance) !!} </td>
</tr>
<tr>
- <td>{{ 'sum_of_reconciliation'|_ }}</td>
- <td>{{ formatAmountByAccount(account, reconSum) }}</td>
+ <td>{{ __('firefly.sum_of_reconciliation') }}</td>
+ <td>{!! format_amount_by_account($account, $reconSum) !!} </td>
</tr>
<tr>
- <td>{{ 'difference'|_ }}</td>
+ <td>{{ __('firefly.difference') }}</td>
<td>
- {{ formatAmountByAccount(account, difference) }}
- <input type="hidden" name="difference" value="{{ difference }}"/>
+ {!! format_amount_by_account($account, $difference) !!}
+ <input type="hidden" name="difference" value="{{ $difference }}"/>
</td>
</tr>
</table>
<p>
- {% if diffCompare > 0 %}
- {{ 'reconcile_has_more'|_ }}
+ @if($diffCompare > 0)
+ {{ __('firefly.reconcile_has_more') }}
@endif
- {% if diffCompare < 0 %}
- {{ 'reconcile_has_less'|_ }}
+ @if($diffCompare < 0)
+ {{ __('firefly.reconcile_has_less') }}
@endif
</p>
- {% if diffCompare == 0 %}
+ @if(0 === $diffCompare)
<p>
- {{ 'reconcile_is_equal'|_ }}
+ {{ __('firefly.reconcile_is_equal') }}
</p>
<input type="hidden" name="reconcile" value="nothing">
@endif
- {% if diffCompare != 0 %}
+ @if(0 !== $diffCompare)
<div class="form-group">
<div class="col-lg-12">
<div class="radio">
<label>
-
<input type="radio" name="reconcile" value="create">
- {% if diffCompare > 0 %}
- {{ trans('firefly.create_neg_reconcile_transaction', {amount: formatAmountByAccount(account, (difference*-1))})|raw }}
+ @if($diffCompare > 0)
+ {!! trans('firefly.create_neg_reconcile_transaction', ['amount' => format_amount_by_account($account, ($difference*-1))]) !!}
@endif
- {% if diffCompare < 0 %}
- {{ trans('firefly.create_pos_reconcile_transaction', {amount: formatAmountByAccount(account, (difference*-1))})|raw }}
+ @if($diffCompare < 0)
+ {!! trans('firefly.create_pos_reconcile_transaction', ['amount' => format_amount_by_account($account, ($difference*-1))]) !!}
@endif
</label>
</div>
@@ -86,20 +85,20 @@
<div class="col-lg-12">
<div class="radio">
<label>
- <input type="radio" checked name="reconcile" value="nothing"> {{ 'reconcile_do_nothing'|_ }}
+ <input type="radio" checked name="reconcile" value="nothing"> {{ __('firefly.reconcile_do_nothing') }}
</label>
</div>
</div>
</div>
<p>
- {{ 'reconcile_go_back'|_ }}
+ {{ __('firefly.reconcile_go_back') }}
</p>
@endif
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{ 'close'|_ }}</button>
- <button type="submit" class="btn btn-primary">{{ 'confirm_reconciliation'|_ }}</button>
+ <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{{ __('firefly.close') }}</button>
+ <button type="submit" class="btn btn-primary">{{ __('firefly.confirm_reconciliation') }}</button>
</div>
</form>
</div>
diff --git a/resources/views/accounts/reconcile/show.twig b/resources/views/accounts/reconcile/show.blade.php
similarity index 57%
rename from resources/views/accounts/reconcile/show.twig
rename to resources/views/accounts/reconcile/show.blade.php
index 322ac98f0d..a2ee3d4ace 100644
--- a/resources/views/accounts/reconcile/show.twig
+++ b/resources/views/accounts/reconcile/show.blade.php
@@ -1,23 +1,18 @@
@extends('layout.v3.session')
-
-{% block breadcrumbs %}
- {{ Breadcrumbs.render(Route.getCurrentRoute.getName, account, journal) }}
-@endsection
-
@section('content')
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="card">
<div class="card-header">
- <h3 class="card-title">{{ 'transaction_journal_information'|_ }}</h3>
+ <h3 class="card-title">{{ __('firefly.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"><span class="bi bi-list"></span>
</button>
<ul class="dropdown-menu" role="menu">
- <li><a href="{{ route('transactions.edit',journal.id) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
- <li><a href="{{ route('transactions.delete',journal.id) }}"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
+ <li><a href="{{ route('transactions.edit',[$journal->id]) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
+ <li><a href="{{ route('transactions.delete',[$journal->id]) }}"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
</ul>
</div>
</div>
@@ -28,23 +23,23 @@
<tbody>
<tr>
<td>{{ trans('list.type') }}</td>
- <td>{{ journal.transactiontype.type|_ }}</td>
+ <td>{{ __('firefly.'.$journal->transactiontype->type) }}</td>
</tr>
<tr>
<td>{{ trans('list.description') }}</td>
- <td>{{ journal.description }}</td>
+ <td>{{ $journal->description }}</td>
</tr>
- {# total amount #}
+ {{-- total amount --}}
<tr>
- <td>{{ 'total_amount'|_ }}</td>
+ <td>{{ __('firefly.total_amount') }}</td>
<td>
- {{ formatAmountByAccount(transaction.account, transaction.amount) }}
+ {!! format_amount_by_account(transaction.account, transaction.amount) !!}
</td>
</tr>
<tr>
<td class="thirty">{{ trans('list.date') }}</td>
- <td>{{ journal.date.isoFormat($monthAndDayFormat) }}</td>
+ <td>{{ $journal->date->isoFormat($monthAndDayFormat) }}</td>
</tr>
</tbody>
</table>
@@ -52,8 +47,8 @@
<div class="card-footer">
<div class="pull-right">
<div class="btn-group">
- <a class="btn btn-outline-secondary" href="{{ route('transactions.edit',journal.id) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a>
- <a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-danger"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}
+ <a class="btn btn-outline-secondary" href="{{ route('transactions.edit',[$journal->id]) }}"><span class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a>
+ <a href="{{ route('transactions.delete',[$journal->id]) }}" class="btn btn-danger"><span class="bi bi-trash"></span> {{ __('firefly.delete') }}
</a>
</div>
</div>
@@ -64,34 +59,24 @@
<div class="card">
<div class="card-header">
- <h3 class="card-title">{{ 'transaction_journal_meta'|_ }}</h3>
+ <h3 class="card-title">{{ __('firefly.transaction_journal_meta') }}</h3>
</div>
<div class="card-body p-0">
<table class="table table-responsive table-hover">
<tbody>
- {#
+ {{--
<tr>
<td>{{ 'categories'|_ }}</td>
<td>{{ journalCategories(journal)|raw }}</td>
</tr>
- #}
- {% if journal.tags|length > 0 %}
+ --}}
+ @if($journal->tags->count() > 0)
<tr>
- <td>{{ 'tags'|_ }}</td>
+ <td>{{ __('firefly.tags') }}</td>
<td>
- {% for tag in journal.tags %}
-
- <h4 class="inline"><a class="badge text-bg-success" href="{{ route('tags.show',tag) }}">
- {% if tag.tag_mode == 'nothing' %}
- <span class="bi bi-tag"></span>
- @endif
- {% if tag.tag_mode == 'balancingAct' %}
- <span class="bi bi-arrow-repeat"></span>
- @endif
- {% if tag.tag_mode == 'advancePayment' %}
- <span class="bi bi-sort-numeric-down"></span>
- @endif
- {{ tag.tag }}</a>
+ @foreach($journal->tags as $tag)
+ <h4 class="inline"><a class="label text-bg-success" href="{{ route('tags.show',[$tag->id]) }}">
+ {{ $tag->tag }}</a>
</h4>
@endforeach
</td>
diff --git a/resources/views/components/elements/transaction-amount.blade.php b/resources/views/components/elements/transaction-amount.blade.php
index 21e40fb88c..e00f4f9918 100644
--- a/resources/views/components/elements/transaction-amount.blade.php
+++ b/resources/views/components/elements/transaction-amount.blade.php
@@ -61,7 +61,7 @@
@endif
@elseif('Reconciliation' === $type)
{{-- Reconciliation positive--}}
- @if('Reconciliation account' === $transaction['source_account_type'])
+ @if('Reconciliation account' === $sourceAccountType)
{{-- amount, also foreign and converted. --}}
{!! format_amount_by_symbol($amount['amount']*-1, $amount['currency_symbol'], $amount['currency_decimal_places']) !!}
@if(null !== $foreign['amount'])
@@ -82,7 +82,7 @@
@endif
@elseif('Liability credit' === $type)
{{-- liability credit positive--}}
- @if('Liability credit' === $transaction['source_account_type'])
+ @if('Liability credit' === $sourceAccountType)
{!! format_amount_by_symbol($amount['amount'], $amount['currency_symbol'], $amount['currency_decimal_places']) !!}
@if(null !== $foreign['amount'])
({!! format_amount_by_symbol($foreign['amount'], $foreign['currency_symbol'], $foreign['currency_decimal_places']) !!})
diff --git a/resources/views/components/elements/transaction-running-balance.blade.php b/resources/views/components/elements/transaction-running-balance.blade.php
index 2048f8c1ef..3094819068 100644
--- a/resources/views/components/elements/transaction-running-balance.blade.php
+++ b/resources/views/components/elements/transaction-running-balance.blade.php
@@ -41,6 +41,15 @@
@else
-
@endif
+ @elseif('Reconciliation' === $type)
+ @if($account?->id == $source['id'])
+ {{-- $source['balance_after'] --}}
+ <span title="Opening balance, src">{!! format_amount_by_symbol('0', $currency['symbol'], $currency['decimal_places']) !!}</span>
+ @elseif($account?->id == $destination['id'])
+ <span title="Opening balance, dest">{!! format_amount_by_symbol($destination['balance_after'], $currency['symbol'], $currency['decimal_places']) !!}</span>
+ @else
+ -
+ @endif
@elseif('Transfer' === $type)
@if($account?->id == $source['id'])
<span title="Transfer, source">{!! format_amount_by_symbol($source['balance_after'], $currency['symbol'], $currency['decimal_places']) !!}</span>
diff --git a/resources/views/components/lists/groups-large.blade.php b/resources/views/components/lists/groups-large.blade.php
index cc5143119c..f974d9e785 100644
--- a/resources/views/components/lists/groups-large.blade.php
+++ b/resources/views/components/lists/groups-large.blade.php
@@ -128,12 +128,13 @@
:foreign="['amount' => $transaction['foreign_amount'],'currency_id' => $transaction['foreign_currency_id'], 'currency_symbol' => $transaction['foreign_currency_symbol'], 'currency_decimal_places' => $transaction['foreign_currency_decimal_places']]"
:account="$account ?? null"
:pc-amount="$transaction['pc_amount']"
+ :source-account-type="$transaction['source_account_type']"
/>
</td>
@if(get_app_configuration('use_running_balance', true))
<td class=" {{ $className }} text-end">
<x-elements.transaction-running-balance
- :balance-dirty="$transaction['balance_dirty'] ?? false"
+ :balance-dirty="($transaction['source_balance_dirty'] ?? false) || ($transaction['destination_balance_dirty'] ?? false)"
:currency="['symbol' => $transaction['currency_symbol'],'decimal_places' => $transaction['currency_decimal_places']]"
:foreign="[]"
:type="$transaction['transaction_type_type']"
diff --git a/resources/views/javascript/variables.blade.php b/resources/views/javascript/variables.blade.php
new file mode 100644
index 0000000000..94423427a4
--- /dev/null
+++ b/resources/views/javascript/variables.blade.php
@@ -0,0 +1,70 @@
+// date ranges
+var ranges = {};
+@foreach($dateRangeConfig['ranges'] as $title => $range)
+ ranges["{{ $title }}"] = [moment("{{ $range[0]->format('Y-m-d') }}"), moment("{{ $range[1]->format('Y-m-d') }}")];
+@endforeach
+
+// date range meta configuration
+var dateRangeMeta = {
+title: "{{ $dateRangeTitle }}",
+url: "{{ route('daterange') }}",
+labels: {
+apply: "{{ __('firefly.apply') }}",
+cancel: "{{ __('firefly.cancel') }}",
+from: "{{ __('firefly.from') }}",
+to: "{{ __('firefly.to') }}",
+customRange: "{{ __('firefly.customRange') }}"
+}
+};
+
+// date range actual configuration:
+var dateRangeConfig = {
+startDate: moment("{{ $dateRangeConfig['start'] }}"),
+endDate: moment("{{ $dateRangeConfig['end'] }}"),
+ranges: ranges
+
+};
+
+var uid = "{{ $uid }}";
+var anonymous = {{ $anonymous }};
+var language = "{{ $language }}";
+var locale = "{{ $locale }}";
+var currencyCode = '{{ $currencyCode }}';
+var currencySymbol = '{{ $currencySymbol }}';
+var mon_decimal_point = "{{ $accountingLocaleInfo['mon_decimal_point'] }}";
+var mon_thousands_sep = "{{ $accountingLocaleInfo['mon_thousands_sep'] }}";
+var frac_digits = {{ $accountingLocaleInfo['frac_digits'] ?? '0' }};
+var noDataForChart = '{{ trans('firefly.no_data_for_chart') }}';
+var showFullList = '{{ trans('firefly.show_full_list') }}';
+var showOnlyTop = '{{ trans('firefly.show_only_top',['number' => $listLength]) }}';
+var accountingConfig = {!! json_encode($accountingLocaleInfo['format']) !!};
+var token = '{{ csrf_token() }}';
+var sessionStart = '{{ session('start')->format('Y-m-d') }}';
+var sessionEnd = '{{ session('end')->format('Y-m-d') }}';
+var todayText = ' {{ trans('firefly.today') }}';
+
+// some formatting stuff:
+var month_and_day_js = "{{ trans('config.month_and_day_js') }}";
+var date_time_js = "{{ trans('config.date_time_js') }}";
+var acc_config_new = {format: accountingConfig};
+
+// strings and translations used often:
+var helpPageTitle = "{{ trans('firefly.help_for_this_page') }}";
+var helpPageBody = "{{ trans('firefly.help_for_this_page_body') }}";
+
+var anonymous_warning_on_txt = "{{ trans('firefly.anonymous_warning_on') }}";
+var anonymous_warning_off_txt= "{{ trans('firefly.anonymous_warning_off') }}";
+
+var edit_selected_txt = "{{ trans('firefly.mass_edit') }}";
+var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit') }}";
+var delete_selected_txt = "{{ trans('firefly.mass_delete') }}";
+
+var mass_edit_url = '{{ route('transactions.mass.edit', ['']) }}';
+var bulk_edit_url = '{{ route('transactions.bulk.edit', ['']) }}';
+var mass_delete_url = '{{ route('transactions.mass.delete', ['']) }}';
+
+// for demo:
+var nextLabel = "{{ trans('firefly.intro_next_label') }}";
+var prevLabel = "{{ trans('firefly.intro_prev_label') }}";
+var skipLabel = "{{ trans('firefly.intro_skip_label') }}";
+var doneLabel = "{{ trans('firefly.intro_done_label') }}";
diff --git a/resources/views/javascript/variables.twig b/resources/views/javascript/variables.twig
deleted file mode 100644
index fef60a0d97..0000000000
--- a/resources/views/javascript/variables.twig
+++ /dev/null
@@ -1,70 +0,0 @@
-// date ranges
-var ranges = {};
-{% for title, range in dateRangeConfig.ranges %}
- ranges["{{ title|escape('js') }}"] = [moment("{{ range[0].format('Y-m-d') }}"), moment("{{ range[1].format('Y-m-d') }}")];
-@endforeach
-
-// date range meta configuration
-var dateRangeMeta = {
-title: "{{ dateRangeTitle|escape('js') }}",
-url: "{{ route('daterange') }}",
-labels: {
-apply: "{{ 'apply'|_ }}",
-cancel: "{{ 'cancel'|_ }}",
-from: "{{ 'from'|_ }}",
-to: "{{ 'to'|_ }}",
-customRange: "{{ 'customRange'|_ }}"
-}
-};
-
-// date range actual configuration:
-var dateRangeConfig = {
-startDate: moment("{{ dateRangeConfig.start }}"),
-endDate: moment("{{ dateRangeConfig.end }}"),
-ranges: ranges
-
-};
-
-var uid = "{{ uid }}";
-var anonymous = {{ anonymous }};
-var language = "{{ language|escape }}";
-var locale = "{{ locale|escape }}";
-var currencyCode = '{{ currencyCode|escape('js') }}';
-var currencySymbol = '{{ currencySymbol|escape('js') }}';
-var mon_decimal_point = "{{ accountingLocaleInfo.mon_decimal_point|escape('js') }}";
-var mon_thousands_sep = "{{ accountingLocaleInfo.mon_thousands_sep|escape('js') }}";
-var frac_digits = {{ accountingLocaleInfo.frac_digits|default('0') }};
-var noDataForChart = '{{ trans('firefly.no_data_for_chart')|escape('js') }}';
-var showFullList = '{{ trans('firefly.show_full_list')|escape('js') }}';
-var showOnlyTop = '{{ trans('firefly.show_only_top',{number:listLength})|escape('js') }}';
-var accountingConfig = {{ accountingLocaleInfo.format|json_encode|raw }};
-var token = '{{ csrf_token() }}';
-var sessionStart = '{{ session('start').format('Y-m-d') }}';
-var sessionEnd = '{{ session('end').format('Y-m-d') }}';
-var todayText = ' {{ trans('firefly.today')|escape('js') }}';
-
-// some formatting stuff:
-var month_and_day_js = "{{ trans('config.month_and_day_js') }}";
-var date_time_js = "{{ trans('config.date_time_js') }}";
-var acc_config_new = {format: accountingConfig};
-
-// strings and translations used often:
-var helpPageTitle = "{{ trans('firefly.help_for_this_page')|escape('js') }}";
-var helpPageBody = "{{ trans('firefly.help_for_this_page_body')|escape('js') }}";
-
-var anonymous_warning_on_txt = "{{ trans('firefly.anonymous_warning_on')|escape('js') }}";
-var anonymous_warning_off_txt= "{{ trans('firefly.anonymous_warning_off')|escape('js') }}";
-
-var edit_selected_txt = "{{ trans('firefly.mass_edit')|escape('js') }}";
-var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit')|escape('js') }}";
-var delete_selected_txt = "{{ trans('firefly.mass_delete')|escape('js') }}";
-
-var mass_edit_url = '{{ route('transactions.mass.edit', ['']) }}';
-var bulk_edit_url = '{{ route('transactions.bulk.edit', ['']) }}';
-var mass_delete_url = '{{ route('transactions.mass.delete', ['']) }}';
-
-// for demo:
-var nextLabel = "{{ trans('firefly.intro_next_label')|escape('js') }}";
-var prevLabel = "{{ trans('firefly.intro_prev_label')|escape('js') }}";
-var skipLabel = "{{ trans('firefly.intro_skip_label')|escape('js') }}";
-var doneLabel = "{{ trans('firefly.intro_done_label')|escape('js') }}";
diff --git a/resources/views/recurring/show.twig b/resources/views/recurring/show.twig
index 1e86064982..1cac5b26d6 100644
--- a/resources/views/recurring/show.twig
+++ b/resources/views/recurring/show.twig
@@ -21,7 +21,7 @@
</h3>
</div>
<div class="card-body">
- <h4>{{ 'transaction_journal_meta'|_ }}</h4>
+ <h4>{{ __('firefly.transaction_journal_meta') }}</h4>
{% if array.nr_of_repetitions > 0 %}
<p>
{% if array.journal_count >= array.nr_of_repetitions %}
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.blade.php
similarity index 97%
rename from resources/views/transactions/show.twig
rename to resources/views/transactions/show.blade.php
index c91604ca92..796e75dc89 100644
--- a/resources/views/transactions/show.twig
+++ b/resources/views/transactions/show.blade.php
@@ -1,15 +1,10 @@
@extends('layout.v3.session')
-
-{% block breadcrumbs %}
- {{ Breadcrumbs.render(Route.getCurrentRoute.getName, transactionGroup) }}
-@endsection
-
@section('content')
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card-header">
- <h3 class="card-title">{{ 'transaction_journal_information'|_ }}</h3>
+ <h3 class="card-title">{{ __('firefly.transaction_journal_information') }}</h3>
<div class="btn-group btn-group-sm pull-right">
<button type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
@@ -17,10 +12,10 @@
</button>
<ul class="dropdown-menu">
{# edit + delete #}
- <li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
+ <li><a href="{{ route('transactions.edit', [$transactionGroup->id]) }}"><span
class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
{% if groupArray.transactions[0].type != 'reconciliation' and groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'liability credit' %}
- <li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
+ <li><a href="{{ route('transactions.delete', [$transactionGroup->id]) }}"><span
class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
@endif
{% if groupArray.transactions[0].type != 'reconciliation' and groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'liability credit' %}
@@ -29,19 +24,19 @@
{# convert to different type #}
{% if groupArray.transactions[0].type != 'withdrawal' %}
<li>
- <a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span
+ <a href="{{ route('transactions.convert.index', ['withdrawal', $transactionGroup->id]) }}"><span
class="bi bi-arrow-left-right"></span> {{ 'convert_to_withdrawal'|_ }}</a></li>
@endif
{% if groupArray.transactions[0].type != 'deposit' %}
<li>
- <a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span
+ <a href="{{ route('transactions.convert.index', ['deposit', $transactionGroup->id]) }}"><span
class="bi bi-arrow-left-right"></span> {{ 'convert_to_deposit'|_ }}</a></li>
@endif
{% if groupArray.transactions[0].type != 'transfer' %}
<li>
- <a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span
+ <a href="{{ route('transactions.convert.index', ['transfer', $transactionGroup->id]) }}"><span
class="bi bi-arrow-left-right"></span> {{ 'convert_to_transfer'|_ }}</a></li>
@endif
@@ -112,7 +107,7 @@
<div class="col-lg-6">
<div class="card">
<div class="card-header">
- <h3 class="card-title">{{ 'transaction_journal_meta'|_ }}</h3>
+ <h3 class="card-title">{{ __('firefly.transaction_journal_meta') }}</h3>
</div>
<div class="card-body p-0">
<table class="table table-hover">
@@ -230,10 +225,10 @@
</button>
<ul class="dropdown-menu">
{# edit + delete #}
- <li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
+ <li><a href="{{ route('transactions.edit', [$transactionGroup->id]) }}"><span
class="bi bi-pencil"></span> {{ __('firefly.edit') }}</a></li>
{% if groupArray.transactions[0].type != 'reconciliation' and groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'liability credit' %}
- <li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
+ <li><a href="{{ route('transactions.delete', [$transactionGroup->id]) }}"><span
class="bi bi-trash"></span> {{ __('firefly.delete') }}</a></li>
@endif
{% if journal.reconciled %}
@@ -246,20 +241,20 @@
{# convert to different type #}
{% if groupArray.transactions[0].type != 'withdrawal' %}
<li>
- <a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span
+ <a href="{{ route('transactions.convert.index', ['withdrawal', $transactionGroup->id]) }}"><span
class="bi bi-arrow-left-right"></span> {{ 'convert_to_withdrawal'|_ }}</a>
</li>
@endif
{% if groupArray.transactions[0].type != 'deposit' %}
<li>
- <a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span
+ <a href="{{ route('transactions.convert.index', ['deposit', $transactionGroup->id]) }}"><span
class="bi bi-arrow-left-right"></span> {{ 'convert_to_deposit'|_ }}</a></li>
@endif
{% if groupArray.transactions[0].type != 'transfer' %}
<li>
- <a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span
+ <a href="{{ route('transactions.convert.index', ['transfer', $transactionGroup->id]) }}"><span
class="bi bi-arrow-left-right"></span> {{ 'convert_to_transfer'|_ }}</a>
</li>
@endif