Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix lint errors
James Cole6377eab98413
diff --git a/app/View/Components/Lists/Attachments.php b/app/View/Components/Lists/Attachments.phpindex 6afb0a146c..c8bdecdd8a 100644--- a/app/View/Components/Lists/Attachments.php+++ b/app/View/Components/Lists/Attachments.php@@ -12,11 +12,11 @@ use Illuminate\View\Component;class Attachments extends Component{- public Collection $attachments;+ public Collection|array $attachments;/*** Create a new component instance.*/- public function __construct(Collection $attachments)+ public function __construct(Collection|array $attachments){$this->attachments = $attachments;}diff --git a/app/View/Components/Lists/GroupsLarge.php b/app/View/Components/Lists/GroupsLarge.phpindex 43bbfad991..c7defdfbe1 100644--- a/app/View/Components/Lists/GroupsLarge.php+++ b/app/View/Components/Lists/GroupsLarge.php@@ -8,11 +8,12 @@ use Closure;use FireflyIII\Models\Account;use Illuminate\Contracts\View\View;use Illuminate\Pagination\LengthAwarePaginator;+use Illuminate\Support\Collection;use Illuminate\View\Component;class GroupsLarge extends Component{- public LengthAwarePaginator $groups;+ public LengthAwarePaginator|Collection $groups;public ?Account $account;public bool $showCategory;public bool $showBudget;@@ -20,7 +21,7 @@ class GroupsLarge extends Component/*** Create a new component instance.*/- public function __construct(LengthAwarePaginator $groups, ?bool $showCategory, ?bool $showBudget, ?Account $account = null)+ public function __construct(LengthAwarePaginator| Collection $groups, ?bool $showCategory, ?bool $showBudget, ?Account $account = null){$this->groups = $groups;$this->account = $account;diff --git a/composer.json b/composer.jsonindex 05747607b1..0ffa2efc75 100644--- a/composer.json+++ b/composer.json@@ -119,7 +119,7 @@"fruitcake/laravel-debugbar": "^4.0","larastan/larastan": "^3","laravel-json-api/testing": "^3.0",- "magentron/laravel-blade-lint": "*",+ "magentron/laravel-blade-lint": "^2.0","mockery/mockery": "1.*","phpstan/extension-installer": "^1.4","phpstan/phpstan": "^2",diff --git a/composer.lock b/composer.lockindex 871bb601c9..81925b66e9 100644--- a/composer.lock+++ b/composer.lock@@ -4,7 +4,7 @@"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies","This file is @generated automatically"],- "content-hash": "7a1b2b684b07b5dfae58bd42e60398d2",+ "content-hash": "4852f0fa1c992ff23e0205143b73db6f","packages": [{"name": "bacon/bacon-qr-code",diff --git a/resources/views/budgets/partials/unused-amount-left.blade.php b/resources/views/budgets/partials/unused-amount-left.blade.phpdeleted file mode 100644index d4713448fc..0000000000--- a/resources/views/budgets/partials/unused-amount-left.blade.php+++ /dev/null@@ -1,96 +0,0 @@-{{-- The amount left can only be shown for actual budget limits. --}}-{% for budgetLimit in budget.budgeted %}- <span class="left_span" data-currency="{{ budgetLimit.currency_id }}" data-limit="{{ budgetLimit.id }}" data-value="{{ budgetLimit.left }}" class="amount_left">- {{-- the amount left --}}- <span title="{{ 'left_in_budget_limit_overview'|_ }}">{!! format_amount_by_symbol(budgetLimit.left, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}</span>-- {{-- if the budget limit is in the past, this is not interesting. --}}- {{-- if there is nothing left, this is not interesting. --}}- {% if not budgetLimit.in_past and -1 == bccomp('0',budgetLimit.left) %}- {% if 0 == budgetLimit.active_days_left %}- <span title="{{ trans('firefly.left_in_budget_limit_per_day', {days: 0}) }}">({!! format_amount_by_symbol(budgetLimit.left, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})- @else- <span title="{{ trans('firefly.left_in_budget_limit_per_day', {days: budgetLimit.active_days_left}) }}">({!! format_amount_by_symbol(budgetLimit.left / budgetLimit.active_days_left, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})</span>- @endif- @endif-- {{-- if there is nothing left, just format 0.00 --}}- {% if not budgetLimit.in_past and -1 != bccomp('0',budgetLimit.left) %}- <span title="{{ 'nothing_left_in_budget'|_ }}">({!! format_amount_by_symbol('0', budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})</span>- @endif-</span><br />-@endforeach---{{---{% for spentInfo in budget.spent %}- {% set countLimit = 0 %}- <!-- loop each budget limit collected for this budget in this period. -->- {% for budgetLimit in budget.budgeted %}- <!-- now looping a single budget limit. -->- {% if spentInfo.currency_id == budgetLimit.currency_id and budgetLimit.in_range %}- <!-- the code below is used for budget limits INSIDE the current view range. -->- {% set countLimit = countLimit + 1 %}-- <span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"- data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">- <!--the amount left is automatically calculated. -->- {!! format_amount_by_symbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}- {% if spentInfo.spent + budgetLimit.amount > 0 %}- {% if 0 == activeDaysLeft %}- ({!! format_amount_by_symbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})- @else- ({!! format_amount_by_symbol((spentInfo.spent + budgetLimit.amount) / activeDaysLeft, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})- @endif- @else- ({!! format_amount_by_symbol(0, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})- @endif- </span>- <br/>- @endif-- {% if spentInfo.currency_id == budgetLimit.currency_id and not budgetLimit.in_range and 0.0 == budgetLimit.total_days %}- <span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"- data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">- {!! format_amount_by_symbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}- </span>- <span class="text-muted">({{ 'unknown'|_ }})</span>- @endif- {% if spentInfo.currency_id == budgetLimit.currency_id and not budgetLimit.in_range and 0.0 != budgetLimit.total_days %}-- <span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"- data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">- {!! format_amount_by_symbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}- </span>- ({!! format_amount_by_symbol((spentInfo.spent + budgetLimit.amount) / budgetLimit.total_days, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})- @endif-- @endforeach-- {% if countLimit == 0 %}- <!-- display nothing -->- @endif- -->-@endforeach- {% for budgetLimit in budget.budgeted %}- {% if null == budget.spent[budgetLimit.currency_id] %}- <span class="left_span" data-currency="{{ spentInfo.currency_id }}" data-limit="{{ budgetLimit.id }}"- data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">- {!! format_amount_by_symbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}- {% if budgetLimit.in_range %}- {% if 0 == activeDaysLeft %}- ({!! format_amount_by_symbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})- @else- ({!! format_amount_by_symbol(budgetLimit.amount / activeDaysLeft, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})- @endif- @endif- {% if not budgetLimit.in_range %}- <!-- For issue #10441, add per day if the budget limit is out of range. -->- ({!! format_amount_by_symbol(budgetLimit.amount / budgetLimit.total_days, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})- @endif- </span>- <br/>- @endif--@endforeach---}}diff --git a/resources/views/budgets/partials/unused-amount-spent.blade.php b/resources/views/budgets/partials/unused-amount-spent.blade.phpdeleted file mode 100644index c8d2632000..0000000000--- a/resources/views/budgets/partials/unused-amount-spent.blade.php+++ /dev/null@@ -1,42 +0,0 @@-{{-- this is spent in budget limits: --}}-{% for budgetLimit in budget.budgeted %}- <span title="{{ 'spent_this_period'|_ }}">{!! format_amount_by_symbol(budgetLimit.spent, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}</span>- {% if 0 == budgetLimit.active_days_passed %}- <span title="{{ trans('firefly.spent_this_period_per_day', {days: 0}) }}">({!! format_amount_by_symbol(budgetLimit.spent, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})</span>- @else- <span title="{{ trans('firefly.spent_this_period_per_day', {days: budgetLimit.active_days_passed}) }}">({!! format_amount_by_symbol(budgetLimit.spent / budgetLimit.active_days_passed, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})</span>- @endif-<br />-@endforeach--{{-- this is spent NOT in budget limits: --}}-{% for spent in budget.spent %}- {% if 0 != bccomp('0', spent.spent_outside) %}- <span title="{{ 'spent_in_budget_limit_outside_period'|_ }}">{!! format_amount_by_symbol(spent.spent_outside, spent.currency_symbol, spent.currency_decimal_places) }}</span>- {% if 0 == activeDaysPassed %}- <span title="{{ trans('firefly.spent_in_budget_limit_outside_period_per_day', {days: 0}) }}">({!! format_amount_by_symbol(spent.spent_outside, spent.currency_symbol, spent.currency_decimal_places) }})</span>- @else- <span title="{{ trans('firefly.spent_in_budget_limit_outside_period_per_day', {days: activeDaysPassed}) }}">({!! format_amount_by_symbol(spent.spent_outside / activeDaysPassed, spent.currency_symbol, spent.currency_decimal_places) }})</span>- @endif- <br />- @endif-@endforeach--{{-----{% for spentInfo in budget.spent %}- {!! format_amount_by_symbol(spentInfo.spent, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}- {% if 0 == activeDaysPassed %}- ({!! format_amount_by_symbol(spentInfo.spent, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})- @else- ({!! format_amount_by_symbol(spentInfo.spent / activeDaysPassed, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})- @endif- <br/>-@endforeach-{% for budgetLimit in budget.budgeted %}- {% if null == budget.spent[budgetLimit.currency_id] %}- {!! format_amount_by_symbol(0, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}<br/>- @endif-@endforeach---}}diff --git a/resources/views/components/lists/groups-large.blade.php b/resources/views/components/lists/groups-large.blade.phpindex 04e630dffd..814f3d1057 100644--- a/resources/views/components/lists/groups-large.blade.php+++ b/resources/views/components/lists/groups-large.blade.php@@ -2,10 +2,18 @@<thead><tr>@if(($showCategory ?? false) || ($showBudget ?? false))- <td colspan="8">{{ $groups->links('pagination.bootstrap-4') }}</td>+ <td colspan="8">+ @if(method_exists($groups, 'links'))+ {{ $groups->links('pagination.bootstrap-4') }}+ @endif+ </td>@else- <td colspan="7">{{ $groups->links('pagination.bootstrap-4') }}</td>- @endif+ <td colspan="7">+ @if(method_exists($groups, 'links'))+ {{ $groups->links('pagination.bootstrap-4') }}+ @endif+ </td>+ @endif<td class="d-xs-none text-end"><!-- Single button --><div class="action-menu d-none"> <!-- d-none -->@@ -234,9 +242,17 @@</tr><tr>@if(($showCategory ?? false) || ($showBudget ?? false))- <td colspan="9" class="no-margin-pagination">{{ $groups->links('pagination.bootstrap-4') }}</td>+ <td colspan="8">+ @if(method_exists($groups, 'links'))+ {{ $groups->links('pagination.bootstrap-4') }}+ @endif+ </td>@else- <td colspan="8" class="no-margin-pagination">{{ $groups->links('pagination.bootstrap-4') }}</td>+ <td colspan="7">+ @if(method_exists($groups, 'links'))+ {{ $groups->links('pagination.bootstrap-4') }}+ @endif+ </td>@endif</tr></tfoot>diff --git a/resources/views/demo/home.blade.php b/resources/views/demo/home.blade.phpindex 85268e795a..da1025d48b 100644--- a/resources/views/demo/home.blade.php+++ b/resources/views/demo/home.blade.php@@ -1 +1 @@-{{ trans('demo.index', {asset: route('accounts.index', ['asset']), budgets: route('budgets.index'), reports: route('reports.index')})|raw }}+{!! trans('demo.index', ['asset' => route('accounts.index', ['asset']), 'budgets' => route('budgets.index'), 'reports' => route('reports.index')]) !!}diff --git a/resources/views/demo/index.blade.php b/resources/views/demo/index.blade.phpindex 85268e795a..da1025d48b 100644--- a/resources/views/demo/index.blade.php+++ b/resources/views/demo/index.blade.php@@ -1 +1 @@-{{ trans('demo.index', {asset: route('accounts.index', ['asset']), budgets: route('budgets.index'), reports: route('reports.index')})|raw }}+{!! trans('demo.index', ['asset' => route('accounts.index', ['asset']), 'budgets' => route('budgets.index'), 'reports' => route('reports.index')]) !!}diff --git a/resources/views/demo/no-demo-text.blade.php b/resources/views/demo/no-demo-text.blade.phpindex 1e7116dc6b..288a48daf6 100644--- a/resources/views/demo/no-demo-text.blade.php+++ b/resources/views/demo/no-demo-text.blade.php@@ -1,3 +1,3 @@-{{ trans('demo.no_demo_text', {route: Route.getCurrentRoute.getName})|raw }}+{{ trans('demo.no_demo_text', ['route' => Route::getCurrentRoute()->getName()]) }}-{{ trans('demo.see_help_icon')|raw }}+{{ trans('demo.see_help_icon') }}diff --git a/resources/views/demo/reports/index.blade.php b/resources/views/demo/reports/index.blade.phpindex adf49baea5..a9c7284915 100644--- a/resources/views/demo/reports/index.blade.php+++ b/resources/views/demo/reports/index.blade.php@@ -1,7 +1,7 @@-{{ trans('demo.reports-index-start')|raw }}+{{ trans('demo.reports-index-start') }}<br/><br/>-{{ trans('demo.reports-index-examples', {- one: route('reports.report.default', ['1,2,3','currentMonthStart','currentMonthEnd']),- two: route('reports.report.default', ['1,2,3','20160101','20161231']),- three: route('reports.report.budget', ['1,2,3','2,1','20160101','20161231'])})|raw }}+{{ trans('demo.reports-index-examples', [+ 'one' => route('reports.report.default', ['1,2,3','currentMonthStart','currentMonthEnd']),+ 'two'=> route('reports.report.default', ['1,2,3','20160101','20161231']),+ 'three'=> route('reports.report.budget', ['1,2,3','2,1','20160101','20161231'])]) }}diff --git a/resources/views/javascript/accounts.blade.php b/resources/views/javascript/accounts.blade.phpindex 82ba05b31a..72c9fb93c5 100644--- a/resources/views/javascript/accounts.blade.php+++ b/resources/views/javascript/accounts.blade.php@@ -1,4 +1,4 @@var accountInfo = [];-{% for id, account in accounts %}- accountInfo[{{ id }}] = {preferredCurrency: {{ account.preferredCurrency }}, name: "{{ account.name }}"};+@foreach($accounts as $id => $account)+ accountInfo[{{ $id }}] = {preferredCurrency: "{{ $account->preferredCurrency }}", name: "{{ $account->name }}"};@endforeachdiff --git a/resources/views/javascript/currencies.blade.php b/resources/views/javascript/currencies.blade.phpindex 43d91a4b9e..7586e018db 100644--- a/resources/views/javascript/currencies.blade.php+++ b/resources/views/javascript/currencies.blade.php@@ -1,4 +1,4 @@var currencyInfo = [];-{% for id, currency in currencies %}- currencyInfo[{{ id }}] = {name: "{{ currency.name }}", symbol: "{{ currency.symbol }}", code: "{{ currency.code }}"};+@foreach($currencies as $id => $currency)+ currencyInfo[{{ $id }}] = {name: "{{ $currency->name }}", symbol: "{{ $currency->symbol }}", code: "{{ $currency->code }}"};@endforeachdiff --git a/resources/views/json/piggy-banks-old.blade.php b/resources/views/json/piggy-banks-old.blade.phpdeleted file mode 100644index be4648f7e3..0000000000--- a/resources/views/json/piggy-banks-old.blade.php+++ /dev/null@@ -1,36 +0,0 @@-<div class="card mb-2">- <div class="card-header">- <h3 class="card-title"><a href="{{ route('piggy-banks.index') }}" title="{{ 'piggyBanks'|_ }}">{{ 'piggyBanks'|_ }}</a></h3>-- </div>- <div class="card-body">- {% for entry in info %}- <strong>{{ entry.name }}</strong><br/>- <div class="progress">- <div class="progress-bar width-{{ entry.percentage|round }}" role="progressbar" aria-valuenow="{{ entry.percentage }}" aria-valuemin="0" aria-valuemax="100">- {% if entry.percentage >=20 %}- {% if convertToPrimary and 0 != avg.pc_amount %}- {!! format_amount_by_symbol(entry.pc_amount, entry.primary_currency_symbol, entry.primary_currency_decimal_places, false) }}- ({!! format_amount_by_symbol(entry.amount, entry.currency_symbol, entry.currency_decimal_places, false) }})- @else- {!! format_amount_by_symbol(entry.amount, entry.currency_symbol, entry.currency_decimal_places, false) }}- @endif- @endif- </div>- {% if entry.percentage < 20 %}- - {% if convertToPrimary and 0 != avg.pc_amount %}- {!! format_amount_by_symbol(entry.pc_amount, entry.primary_currency_symbol, entry.primary_currency_decimal_places, false) }}- ({!! format_amount_by_symbol(entry.amount, entry.currency_symbol, entry.currency_decimal_places, false) }})- @else- {!! format_amount_by_symbol(entry.amount, entry.currency_symbol, entry.currency_decimal_places, false) }}- @endif- @endif- </div>- @endforeach- </div>- <div class="card-footer">- <a href="{{ route('piggy-banks.index') }}" class="btn btn-outline-secondary button-sm"><span- class="bi bi-download"></span> {{ 'go_to_piggies'|_ }}</a>- </div>-</div>diff --git a/resources/views/partials/layout/breadcrumbs.blade.php b/resources/views/partials/layout/breadcrumbs.blade.phpdeleted file mode 100644index bf8b2a0702..0000000000--- a/resources/views/partials/layout/breadcrumbs.blade.php+++ /dev/null@@ -1,13 +0,0 @@--{% if breadcrumbs|length > 0 %}--<ol class="breadcrumb">- {% for breadcrumb in breadcrumbs %}- {% if breadcrumb.url and not loop.last %}- <li><a href="{{ breadcrumb.url }}">{{ breadcrumb.title }}</a></li>- @else- <li class="active">{{ breadcrumb.title }}</li>- @endif- @endforeach-</ol>-@endifdiff --git a/resources/views/popup/list/journals.blade.php b/resources/views/popup/list/journals.blade.phpindex 1323263e3f..5b87b99e7a 100644--- a/resources/views/popup/list/journals.blade.php+++ b/resources/views/popup/list/journals.blade.php@@ -1,26 +1,26 @@-<table class="table table-hover table-sm">+ <table class="table table-hover table-sm"><thead><tr><th> </th><th>{{ trans('list.description') }}</th><th>{{ trans('list.amount') }}</th><th class="hidden-sm hidden-xs">{{ trans('list.date') }}</th>- {% if not hideSource %}+ @if(!$hideSource)<th class="hidden-xs">{{ trans('list.from') }}</th>@endif- {% if not hideDestination %}+ @if(!$hideDestination)<th class="hidden-xs">{{ trans('list.to') }}</th>@endif{{-- Hide budgets? --}}- {% if not hideBudget %}+ @if(!$hideBudget)<th class="hidden-xs"><span class="bi bi-pie-chart" title="{{ trans('list.budget') }}"></span></th>@endif{{-- Hide categories? --}}- {% if not hideCategory %}+ @if(!$hideCategory)<th class="hidden-xs"><span class="bi bi-bookmark" title="{{ trans('list.category') }}"></span></th>@@ -29,108 +29,100 @@</thead><tbody>{{-- Make sum: --}}- {% set sum = 0 %}- {% set symbol = '' %}- {% set decimal_places =2 %}- {% for transaction in journals %}+ @php+ $sum = 0;+ $symbol = '';+ $decimal_places = 2;+ @endphp+ @foreach($journals as $transaction){{-- add to sum --}}- {% set symbol = transaction.currency_symbol %}- {% set decimal_places = transaction.currency_decimal_places %}- <tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}">+ @php+ $symbol = $transaction['currency_symbol'];+ $decimal_places = $transaction['currency_decimal_places'];+ @endphp+ <tr class="drag" data-date="{{ $transaction['date']->format('Y-m-d') }}" data-id="{{ $transaction['journal_id'] }}"><td class="hidden-xs">- {% if transaction.transaction_type_type == 'Withdrawal' %}- <span class="bi bi-arrow-left" title="{{ trans('firefly.Withdrawal') }}"></span>- @endif-- {% if transaction.transaction_type_type == 'Deposit' %}- <span class="bi bi-arrow-right" title="{{ trans('firefly.Deposit') }}"></span>- @endif-- {% if transaction.transaction_type_type == 'Transfer' %}- <span class="bi bi-arrow-left-right" title="{{ trans('firefly.Transfer') }}"></span>- @endif-- {% if transaction.transaction_type_type == 'Reconciliation' %}- XX- @endif-- {% if transaction.transaction_type_type == 'Opening balance' %}- XX- @endif+ <x-elements.transaction-type-icon type="$transaction['transaction_type_type']" /></td><td>- <a href="{{ route('transactions.show',transaction.transaction_group_id) }}">- {% if transaction.group_title|length > 0 %}- {{ transaction.group_title }} ({{ transaction.description }})+ <a href="{{ route('transactions.show',$transaction['transaction_group_id']) }}">+ @if(strlen($transaction['group_title']) > 0)+ {{ $transaction['group_title'] }} ({{ $transaction['description'] }})@else- {{ transaction.description }}+ {{ $transaction['description'] }}@endif</a></td><td>- {% if transaction.transaction_type_type == 'Deposit' %}- {!! format_amount_by_symbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}- {% if null != transaction.foreign_amount %}- ({!! format_amount_by_symbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})+ @if('Deposit' == $transaction['transaction_type_type'])+ {!! format_amount_by_symbol($transaction['amount']*-1, $transaction['currency_symbol'], $transaction['currency_decimal_places']) !!}+ @if(null !== $transaction['foreign_amount'])+ ({!! format_amount_by_symbol($transaction['foreign_amount']*-1, $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) !!})@endif- {% set sum = (sum + (transaction.amount*-1)) %}- {% elseif transaction.transaction_type_type == 'Transfer' %}+ @php+ $sum = $sum + ($transaction['amount']*-1);+ @endphp+ @elseif('Transfer' === $transaction['transaction_type_type'])<span class="text-info money-transfer">- {!! format_amount_by_symbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places, false) }}- {% if null != transaction.foreign_amount %}- ({!! format_amount_by_symbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})+ {!! format_amount_by_symbol($transaction['amount']*-1, $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}+ @if(null !== $transaction['foreign_amount'])+ ({!! format_amount_by_symbol($transaction['foreign_amount']*-1, $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})@endif</span>- {% set sum = (sum + transaction.amount*-1) %}+ @php+ $sum = $sum + ($transaction['amount']*-1);+ @endphp@else- {!! format_amount_by_symbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}- {% if null != transaction.foreign_amount %}- ({!! format_amount_by_symbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})+ {!! format_amount_by_symbol($transaction['amount'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) !!}+ @if(null !== $transaction['foreign_amount'])+ ({!! format_amount_by_symbol($transaction['foreign_amount'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) !!})@endif- {% set sum = (sum + transaction.amount) %}+ @php+ $sum = $sum + $transaction['amount'];+ @endphp@endif</td><td class="hidden-sm hidden-xs">- {{ transaction.date.isoFormat($monthAndDayFormat) }}+ {{ $transaction['date']->isoFormat($monthAndDayFormat) }}</td>- {% if not hideSource %}+ @if(!$hideSource)<td class="hidden-xs">- <a href="{{ route('accounts.show', transaction.source_account_id) }}">- {{ transaction.source_account_name }}+ <a href="{{ route('accounts.show', $transaction['source_account_id']) }}">+ {{ $transaction['source_account_name'] }}</a></td>@endif- {% if not hideDestination %}+ @if(!$hideDestination)<td class="hidden-xs">- <a href="{{ route('accounts.show', transaction.destination_account_id) }}">- {{ transaction.destination_account_name }}+ <a href="{{ route('accounts.show', $transaction['destination_account_id']) }}">+ {{ $transaction['destination_account_name'] }}</a></td>@endif<!-- Do NOT hide the budget? -->- {% if not hideBudget %}+ @if(!$hideBudget)<td class="hidden-xs">- {% if transaction.budget_id %}- <a href="{{ route('budgets.show', [transaction.budget_id]) }}">- {{ transaction.budget_name }}+ @if(null !== $transaction['budget_id'])+ <a href="{{ route('budgets.show', [$transaction['budget_id']]) }}">+ {{ $transaction['budget_name'] }}</a>@endif</td>@endif<!-- Do NOT hide the category? -->- {% if not hideCategory %}+ @if(!$hideCategory)<td class="hidden-xs">- {% if transaction.category_id %}- <a href="{{ route('categories.show', [transaction.category_id]) }}">- {{ transaction.category_name }}+ @if(null !== $transaction['category_id'])+ <a href="{{ route('categories.show', [$transaction['category_id']]) }}">+ {{ $transaction['category_name'] }}</a>@endif</td>@@ -142,8 +134,8 @@<tr><td colspan="2" class="text-end"><em>{{ __('firefly.sum') }}:</em></td><td>- {% if sum != 0 %}- {!! format_amount_by_symbol(sum, symbol, decimal_places) }}+ @if($sum !== 0)+ {!! format_amount_by_symbol($sum, $symbol, $decimal_places) !!}@endif</td></tr>diff --git a/resources/views/popup/report/balance-amount.blade.php b/resources/views/popup/report/balance-amount.blade.phpindex 00ff87460d..1c9872f820 100644--- a/resources/views/popup/report/balance-amount.blade.php+++ b/resources/views/popup/report/balance-amount.blade.php@@ -2,14 +2,16 @@<div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="balanceAmountTitle">{{ trans('firefly.balance_amount',- {budget: budget.name, account: account.name, start: $start->isoFormat($monthAndDayFormat), end: $end->isoFormat($monthAndDayFormat)}+ ['budget' => $budget->name, 'account' => $account->name, 'start' => $start->isoFormat($monthAndDayFormat), 'end' => $end->isoFormat($monthAndDayFormat)]) }}</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('firefly.close') }}"></button></div><div class="modal-body">- {% set hideSource = true %}- {% set hideBudget = true %}- {% include 'popup.list.journals' %}+ @php+ $hideSource = true;+ $hideBudget = true;+ @endphp+ @include('popup.list.journals')</div><div class="modal-footer"><button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{{ __('firefly.close') }}</button>diff --git a/resources/views/popup/report/budget-spent-amount.blade.php b/resources/views/popup/report/budget-spent-amount.blade.phpindex 819622f9e7..62d272d7be 100644--- a/resources/views/popup/report/budget-spent-amount.blade.php+++ b/resources/views/popup/report/budget-spent-amount.blade.php@@ -2,7 +2,7 @@<div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="budgetSpentAmountLabel">- {{ trans('firefly.budget_spent_amount', {start: $start->isoFormat($monthAndDayFormat), end: $end->isoFormat($monthAndDayFormat), budget: budget.name}) }}+ {{ trans('firefly.budget_spent_amount', ['start' => $start->isoFormat($monthAndDayFormat), 'end' => $end->isoFormat($monthAndDayFormat), 'budget' => $budget->name]) }}</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('firefly.close') }}"></button></div>diff --git a/resources/views/popup/report/category-entry.blade.php b/resources/views/popup/report/category-entry.blade.phpindex 4db97ddc59..d17141b458 100644--- a/resources/views/popup/report/category-entry.blade.php+++ b/resources/views/popup/report/category-entry.blade.php@@ -2,12 +2,14 @@<div class="modal-content"><div class="modal-header"><h5 class="modal-title"- id="expenseEntryTitle">{{ trans('firefly.category_entry', {name: category.name, start: $start->isoFormat($monthAndDayFormat), end: $end->isoFormat($monthAndDayFormat)}) }}</h5>+ id="expenseEntryTitle">{{ trans('firefly.category_entry', ['name' => $category->name, 'start' => $start->isoFormat($monthAndDayFormat), 'end' => $end->isoFormat($monthAndDayFormat)]) }}</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('firefly.close') }}"></button></div><div class="modal-body">- {% set hideCategory = true %}- {% include 'popup.list.journals' %}+ @php+ $hideCategory = true;+ @endphp+ @include('popup.list.journals')</div><div class="modal-footer"><button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{{ __('firefly.close') }}</button>diff --git a/resources/views/popup/report/expense-entry.blade.php b/resources/views/popup/report/expense-entry.blade.phpindex 33a7fc66da..34d301b246 100644--- a/resources/views/popup/report/expense-entry.blade.php+++ b/resources/views/popup/report/expense-entry.blade.php@@ -2,7 +2,7 @@<div class="modal-content"><div class="modal-header"><h5 class="modal-title"- id="expenseEntryTitle">{{ trans('firefly.expense_entry', {name: account.name, start: $start->isoFormat($monthAndDayFormat), end: $end->isoFormat($monthAndDayFormat)}) }}</h5>+ id="expenseEntryTitle">{{ trans('firefly.expense_entry', ['name' => $account->name, 'start' => $start->isoFormat($monthAndDayFormat), 'end' => $end->isoFormat($monthAndDayFormat)]) }}</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('firefly.close') }}"></button></div><div class="modal-body">diff --git a/resources/views/popup/report/income-entry.blade.php b/resources/views/popup/report/income-entry.blade.phpindex 36e477dcf9..5065e292cd 100644--- a/resources/views/popup/report/income-entry.blade.php+++ b/resources/views/popup/report/income-entry.blade.php@@ -2,7 +2,7 @@<div class="modal-content"><div class="modal-header"><h5 class="modal-title"- id="incomeEntryTitle">{{ trans('firefly.income_entry', {name: account.name, start: $start->isoFormat($monthAndDayFormat), end: $end->isoFormat($monthAndDayFormat)}) }}</h5>+ id="incomeEntryTitle">{{ trans('firefly.income_entry', ['name' => $account->name, 'start' => $start->isoFormat($monthAndDayFormat), 'end' => $end->isoFormat($monthAndDayFormat)]) }}</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('firefly.close') }}"></button></div><div class="modal-body">diff --git a/resources/views/recurring/delete.blade.php b/resources/views/recurring/delete.blade.phpindex a4ef4bf3e8..08bd06ab1a 100644--- a/resources/views/recurring/delete.blade.php+++ b/resources/views/recurring/delete.blade.php@@ -1,18 +1,13 @@@extends('layout.v3.session')--- {{ Breadcrumbs.render(Route.getCurrentRoute.getName, recurrence) }}-@endsection-@section('content')- <form method="POST" action="{{ route('recurring.destroy',recurrence.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">+ <form method="POST" action="{{ route('recurring.destroy',$recurrence->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 offset-lg-3 col-md-12 col-sm-12"><div class="card card-danger card-outline"><div class="card-header">- <h3 class="card-title">{{ trans('form.delete_recurring', {'title': recurrence.title}) }}</h3>+ <h3 class="card-title">{{ trans('form.delete_recurring', ['title' => $recurrence->title]) }}</h3></div><div class="card-body"><p class="text-danger">@@ -20,12 +15,12 @@</p><p>- {{ trans('form.recurring_areYouSure', {'title': recurrence.title}) }}+ {{ trans('form.recurring_areYouSure', ['title' => $recurrence->title]) }}</p><p>- {% if journalsCreated > 0 %}- {{ Lang::choice('form.recurring_keep_transactions', journalsCreated, {count: journalsCreated }) }}+ @if($journalsCreated > 0)+ {{ Lang::choice('form.recurring_keep_transactions', $journalsCreated, ['count' => $journalsCreated]) }}@endif</p></div>@@ -39,3 +34,6 @@</form>@endsection+@section('scripts')+ @vite(['js/pages/generic.js'])+@endsectiondiff --git a/resources/views/recurring/edit.blade.php b/resources/views/recurring/edit.blade.phpindex ffaf463746..d770bd4b59 100644--- a/resources/views/recurring/edit.blade.php+++ b/resources/views/recurring/edit.blade.php@@ -1,10 +1,7 @@@extends('layout.v3.session')-- {{ Breadcrumbs.render(Route.getCurrentRoute.getName, recurrence) }}-@endsection@section('content')- <form method="post" action="{{ route('recurring.update', recurrence.id) }}" class="form-horizontal"+ <form method="post" action="{{ route('recurring.update', $recurrence->id) }}" class="form-horizontal"accept-charset="UTF-8"enctype="multipart/form-data"><input type="hidden" name="_token" value="{{ csrf_token() }}"/>@@ -16,18 +13,18 @@{{-- mandatory recurrence stuff --}}<div class="card mb-2"><div class="card-header">- <h3 class="card-title">{{ 'mandatory_for_recurring'|_ }}</h3>+ <h3 class="card-title">{{ __('firefly.mandatory_for_recurring') }}</h3></div><div class="card-body">- <input type="hidden" name="id" value="{{ array.id }}"/>- {!! ExpandedForm::text('title', array.title) }}- {!! ExpandedForm::date('first_date',array.first_date, {helpText: trans('firefly.help_first_date_no_past')}) }}- {!! ExpandedForm::select('repetition_type', [], null, {helpText: trans('firefly.change_date_other_options')}) }}- {!! ExpandedForm::integer('skip', array.repetitions[0].skip, {'helpText': trans('firefly.skip_help_text')}) }}- {!! ExpandedForm::select('weekend', weekendResponses, array.repetitions[0].weekend, {helpText: trans('firefly.help_weekend')}) }}- {!! ExpandedForm::select('repetition_end', repetitionEnds, repetitionEnd) }}- {!! ExpandedForm::date('repeat_until',array.repeat_until) }}- {!! ExpandedForm::integer('repetitions', array.nr_of_repetitions) }}+ <input type="hidden" name="id" value="{{ $array['id'] }}"/>+ {!! ExpandedForm::text('title', $array['title']) !!}+ {!! ExpandedForm::date('first_date',$array['first_date'], ['helpText' => trans('firefly.help_first_date_no_past')]) !!}+ {!! ExpandedForm::select('repetition_type', [], null, ['helpText' => trans('firefly.change_date_other_options')]) !!}+ {!! ExpandedForm::integer('skip', $array['repetitions'][0]['skip'], ['helpText' => trans('firefly.skip_help_text')]) !!}+ {!! ExpandedForm::select('weekend', $weekendResponses, $array['repetitions'][0]['weekend'], ['helpText' => trans('firefly.help_weekend')]) !!}+ {!! ExpandedForm::select('repetition_end', $repetitionEnds, $repetitionEnd) !!}+ {!! ExpandedForm::date('repeat_until',$array['repeat_until']) !!}+ {!! ExpandedForm::integer('repetitions', $array['nr_of_repetitions']) !!}{{-- calendar in popup --}}<div class="form-group" id="calendar_holder">@@ -36,7 +33,7 @@<div class="col-sm-8"><p class="form-control-static" id="ffInput_calendar">- <a href="#" id="calendar-link">{{ 'click_for_calendar'|_ }}</a>+ <a href="#" id="calendar-link">{{ __('firefly.click_for_calendar') }}</a></p></div></div>@@ -48,15 +45,15 @@{{-- optional recurrence stuff --}}<div class="card mb-2"><div class="card-header">- <h3 class="card-title">{{ 'optional_for_recurring'|_ }}</h3>+ <h3 class="card-title">{{ __('firefly.optional_for_recurring') }}</h3></div><div class="card-body">- {!! ExpandedForm::textarea('recurring_description',array.description) }}+ {!! ExpandedForm::textarea('recurring_description',$array['description']) !!}{{-- only correct way to do active checkbox --}}- {!! ExpandedForm::checkbox('active', 1, preFilled.active) }}- {!! ExpandedForm::checkbox('apply_rules', 1, preFilled.apply_rules) }}- {!! ExpandedForm::file('attachments[]', ['multiple' => 'multiple','helpText' => trans('firefly.upload_max_file_size', ['size' => print_nice_filesize($uploadSize)])]) }}+ {!! ExpandedForm::checkbox('active', 1, $preFilled['active']) !!}+ {!! ExpandedForm::checkbox('apply_rules', 1, $preFilled['apply_rules']) !!}+ {!! ExpandedForm::file('attachments[]', ['multiple' => 'multiple','helpText' => trans('firefly.upload_max_file_size', ['size' => print_nice_filesize($uploadSize)])]) !!}</div></div></div>@@ -67,10 +64,10 @@{{-- mandatory transaction information --}}<div class="card mb-2"><div class="card-header">- <h3 class="card-title">{{ 'mandatory_for_transaction'|_ }}</h3>+ <h3 class="card-title">{{ __('firefly.mandatory_for_transaction') }}</h3></div><div class="card-body">- <p><em>{{ 'mandatory_fields_for_tranaction'|_ }}</em></p>+ <p><em>{{ __('firefly.mandatory_fields_for_tranaction') }}</em></p>{{-- three buttons to distinguish type of transaction --}}<div class="form-group" id="name_holder"><label for="ffInput_type" class="col-sm-4 control-label">@@ -80,32 +77,32 @@<div class="col-sm-8"><div class="btn-group btn-group-sm"><a href="#" class="btn btn-outline-secondary switch-button"- data-value="withdrawal">{{ 'withdrawal'|_ }}</a>+ data-value="withdrawal">{{ __('firefly.withdrawal') }}</a><a href="#" class="btn btn-outline-secondary switch-button"- data-value="deposit">{{ 'deposit'|_ }}</a>+ data-value="deposit">{{ __('firefly.deposit') }}</a><a href="#" class="btn btn-outline-secondary switch-button"- data-value="transfer">{{ 'transfer'|_ }}</a>+ data-value="transfer">{{ __('firefly.transfer') }}</a></div></div></div><input type="hidden" name="transaction_type" value="">{{-- end of three buttons --}}- {!! ExpandedForm::text('transaction_description', array.transactions[0].description) }}+ {!! ExpandedForm::text('transaction_description', $array['transactions'][0]['description']) !!}{{-- transaction information (mandatory) --}}- {!! CurrencyForm::currencyList('transaction_currency_id', array.transactions[0].currency_id) }}- {!! ExpandedForm::amountNoCurrency('amount', array.transactions[0].amount) }}+ {!! CurrencyForm::currencyList('transaction_currency_id', $array['transactions'][0]['currency_id']) !!}+ {!! ExpandedForm::amountNoCurrency('amount', $array['transactions'][0]['amount']) !!}{{-- source account if withdrawal, or if transfer: --}}- {{ AccountForm::longAccountList('source_id', array.transactions[0].source_id, {label: trans('form.asset_source_account')}) }}+ {!! AccountForm::longAccountList('source_id', $array['transactions'][0]['source_id'], ['label' => trans('form.asset_source_account')]) !!}{{-- NEW for deposits, a drop down with revenue accounts, loan debt cash and mortgage --}}- {{ AccountForm::activeDepositDestinations('deposit_source_id', preFilled.deposit_source_id, {label: trans('form.deposit_source_id')}) }}+ {!! AccountForm::activeDepositDestinations('deposit_source_id', $preFilled['deposit_source_id'], ['label' => trans('form.deposit_source_id')]) !!}{{-- destination if deposit or transfer: --}}- {{ AccountForm::longAccountList('destination_id', array.transactions[0].destination_id, {label: trans('form.asset_destination_account')} ) }}+ {!! AccountForm::longAccountList('destination_id', $array['transactions'][0]['destination_id'], ['label' => trans('form.asset_destination_account')]) !!}{{-- NEW for withdrawals, also a drop down with expense accounts, loans, debts, mortgages or (cash). --}}- {{ AccountForm::activeWithdrawalDestinations('withdrawal_destination_id', preFilled.withdrawal_destination_id, {label: trans('form.withdrawal_destination_id')}) }}+ {!! AccountForm::activeWithdrawalDestinations('withdrawal_destination_id', $preFilled['withdrawal_destination_id'], ['label' => trans('form.withdrawal_destination_id')]) !!}</div></div></div>@@ -114,42 +111,42 @@{{-- optional transaction information --}}<div class="card mb-2"><div class="card-header">- <h3 class="card-title">{{ 'optional_for_transaction'|_ }}</h3>+ <h3 class="card-title">{{ __('firefly.optional_for_transaction') }}</h3></div><div class="card-body">{{-- transaction information (optional) --}}- {!! CurrencyForm::currencyListEmpty('foreign_currency_id', array.transactions[0].foreign_currency_id) }}- {!! ExpandedForm::amountNoCurrency('foreign_amount', array.transactions[0].foreign_amount) }}+ {!! CurrencyForm::currencyListEmpty('foreign_currency_id', $array['transactions'][0]['foreign_currency_id']) !!}+ {!! ExpandedForm::amountNoCurrency('foreign_amount', $array['transactions'][0]['foreign_amount']) !!}{{-- BUDGET ONLY WHEN CREATING A WITHDRAWAL --}}- {% if budgets|length > 1 %}- {!! ExpandedForm::select('budget_id', budgets, array.transactions[0].budget_id) }}+ @if(count($budgets) > 0)+ {!! ExpandedForm::select('budget_id', $budgets, $array['transactions'][0]['budget_id']) !!}@else- {!! ExpandedForm::select('budget_id', budgets, array.transactions[0].budget_id, {helpText: trans('firefly.no_budget_pointer', {link: route('budgets.index')})}) }}+ {!! ExpandedForm::select('budget_id', $budgets, $array['transactions'][0]['budget_id'], ['helpText' => trans('firefly.no_budget_pointer', ['link' => route('budgets.index')])]) !!}{{-- budgets --}}@endif- {# CATEGORY ALWAYS --}}- {!! ExpandedForm::text('category',array.transactions[0].category_name) }}+ {{-- CATEGORY ALWAYS --}}+ {!! ExpandedForm::text('category',$array['transactions'][0]['category_name']) !!}- {# BILL ONLY WHEN CREATING A WITHDRAWAL --}}- {% if bills|length > 1 %}- {!! ExpandedForm::select('bill_id', bills, array.transactions[0].subscription_id) }}+ {{-- BILL ONLY WHEN CREATING A WITHDRAWAL --}}+ @if(count($bills) > 0)+ {!! ExpandedForm::select('bill_id', $bills, $array['transactions'][0]['subscription_id']) !!}@else- {!! ExpandedForm::select('bill_id', bills, array.transactions[0].subscription_id, {helpText: trans('firefly.no_bill_pointer', {link: route('subscriptions.index')})}) }}+ {!! ExpandedForm::select('bill_id', $bills, $array['transactions'][0]['subscription_id'], ['helpText' => trans('firefly.no_bill_pointer', ['link' => route('subscriptions.index')])]) !!}@endif- {# TAGS --}}- {!! ExpandedForm::text('tags', array.transactions[0].tags) }}+ {{-- TAGS --}}+ {!! ExpandedForm::text('tags', $array['transactions'][0]['tags']) !!}- {# RELATE THIS TRANSFER TO A PIGGY BANK --}}- {{ PiggyBankForm::piggyBankList('piggy_bank_id',array.transactions[0].piggy_bank_id) }}+ {{-- RELATE THIS TRANSFER TO A PIGGY BANK --}}+ {!! PiggyBankForm::piggyBankList('piggy_bank_id',$array['transactions'][0]['piggy_bank_id']) !!}</div></div></div></div>- {# row with submit stuff. --}}+ {{-- row with submit stuff. --}}<div class="row"><div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"><div class="card mb-2">@@ -157,21 +154,21 @@<h3 class="card-title">{{ __('firefly.options') }}</h3></div><div class="card-body">- {!! ExpandedForm::optionsList('update','recurrence') }}+ {!! ExpandedForm::optionsList('update','recurrence') !!}</div><div class="card-footer text-end"><button type="submit" class="btn btn-success">- {{ ('update_recurrence')|_ }}+ {{ __('firefly.update_recurrence') }}</button></div></div></div></div>- {#+ {{--<div class="row"><div class="card mb-2"><div class="card-header">- <h3 class="card-title">{{ 'expected_repetitions'|_ }}</h3>+ <h3 class="card-title">{{ __('firefly.expected_repetitions') }}</h3></div><div class="card-body">Here.@@ -183,12 +180,12 @@--}}</form>- {# calendar modal --}}+ {{-- calendar modal --}}<div class="modal fade" id="calendarModal" tabindex="-1" role="dialog"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header">- <h4 class="modal-title">{{ 'recurring_calendar_view'|_ }}</h4>+ <h4 class="modal-title">{{ __('firefly.recurring_calendar_view') }}</h4></div><div class="modal-body"><div id="recurring_calendar" class="calendar-display">@@ -204,6 +201,7 @@</div>@endsection@section('scripts')+ @vite(['js/pages/generic.js'])<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ $FF_BUILD_TIME }}"nonce="{{ $JS_NONCE }}"></script><script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ $FF_BUILD_TIME }}"@@ -216,10 +214,10 @@<script type="text/javascript" src="v1/lib/fc/fullcalendar.min.js?v={{ $FF_BUILD_TIME }}"nonce="{{ $JS_NONCE }}"></script><script type="text/javascript" nonce="{{ $JS_NONCE }}">- var transactionType = "{{ preFilled.transaction_type }}";+ var transactionType = "{{ $preFilled['transaction_type'] }}";var suggestUrl = "{{ route('recurring.suggest') }}";var eventsUrl = "{{ route('recurring.events') }}";- var currentRepType = "{{ currentRepType }}";+ var currentRepType = "{{ $currentRepType }}";</script><script type="text/javascript" src="v1/js/ff/recurring/edit.js?v={{ $FF_BUILD_TIME }}" nonce="{{ $JS_NONCE }}"></script>@endsectiondiff --git a/resources/views/recurring/show.blade.php b/resources/views/recurring/show.blade.phpindex 901094b078..608a229881 100644--- a/resources/views/recurring/show.blade.php+++ b/resources/views/recurring/show.blade.php@@ -1,9 +1,4 @@@extends('layout.v3.session')--- {{ Breadcrumbs.render(Route.getCurrentRoute.getName, recurrence) }}-@endsection-@section('content')<div class="row"><!-- basic info -->@@ -11,49 +6,50 @@<div class="card mb-2"><div class="card-header"><h3 class="card-title">- {{ array.title }}+ {{ $array['title'] }}- ({{ array.type }})+ ({{ $array['type'] }})- {% if array.active == false %}- ({{ 'inactive'|_|lower }})+ @if(false === $array['active'])+ ({{ strtolower(__('firefly.inactive')) }})@endif</h3></div><div class="card-body"><h4>{{ __('firefly.transaction_journal_meta') }}</h4>- {% if array.nr_of_repetitions > 0 %}+ @if($array['nr_of_repetitions'] > 0)<p>- {% if array.journal_count >= array.nr_of_repetitions %}- <span class="text-danger">{{ trans('firefly.recurrence_max_count', {count: array.journal_count, max: array.nr_of_repetitions}) }}</span>+ @if($array['journal_count'] >= $array['nr_of_repetitions'])+ <span class="text-danger">{{ trans('firefly.recurrence_max_count', ['count' => $array['journal_count'], 'max' => $array['nr_of_repetitions']]) }}</span>@endif- {% if array.journal_count < array.nr_of_repetitions %}- {{ trans('firefly.recurrence_max_count', {count: array.journal_count, max: array.nr_of_repetitions}) }}+ @if($array['journal_count'] < $array['nr_of_repetitions'])+ {{ trans('firefly.recurrence_max_count', ['count' => $array['journal_count'], 'max' => $array['nr_of_repetitions']]) }}@endif</p>@endif- <p>{{ __('firefly.description') }}: <em>{{ array.description }}</em></p>+ <p>{{ __('firefly.description') }}: <em>{{ $array['description'] }}</em></p>- {% if array.active == false %}+ @if(false === $array['active'])<p>- {{ 'recurrence_is_inactive'|_ }}+ {{ __('firefly.recurrence_is_inactive') }}+</p>@endif<ul>- {% for rep in array.repetitions %}- <li>{{ rep.description }}</li>+ @foreach($array['repetitions'] as $rep)+ <li>{{ $rep['description'] }}</li>@endforeach</ul><h4>{{ __('firefly.attachments') }}</h4>- {% include 'list.attachments' with {attachments: array.attachments} %}+ <x-lists.attachments :attachments="$array['attachments']" /></div><div class="card-footer"><div class="btn-group">- <a href="{{ route('recurring.edit', [array.id]) }}" class="btn btn-sm btn-outline-secondary"><span+ <a href="{{ route('recurring.edit', [$array['id']]) }}" class="btn btn-sm btn-outline-secondary"><spanclass="bi bi-pencil"></span> {{ __('firefly.edit') }}</a>- <a href="{{ route('recurring.delete', [array.id]) }}" class="btn btn-sm btn-danger">{{ __('firefly.delete') }}+ <a href="{{ route('recurring.delete', [$array['id']]) }}" class="btn btn-sm btn-danger">{{ __('firefly.delete') }}<span class="bi bi-trash"></span></a></div></div>@@ -64,39 +60,40 @@<div class="card mb-2"><div class="card-header"><h3 class="card-title">- {{ ('expected_'~array.type~'s')|_ }}+ {{ __('firefly.expected_' . $array['type'] . 's') }}</h3></div><div class="card-body">- {% if null != array.repeat_until and today > array.repeat_until %}+ @if(null !== $array['repeat_until'] && now() > $array['repeat_until'])+<span class="text-danger">- {{ trans('firefly.repeat_until_in_past', {date: array.repeat_until.isoFormat($monthAndDayFormat) }) }}+ {{ trans('firefly.repeat_until_in_past', ['date' => $array['repeat_until']->isoFormat($monthAndDayFormat)]) }}</span>@endif- {% for rep in array.repetitions %}+ @foreach($array['repetitions'] as $rep)<p>- <strong>{{ rep.description }}- {% if rep.repetition_skip == 1 %}- ({{ trans('firefly.recurring_skips_one')|lower }})+ <strong>{{ $rep['description'] }}+ @if($rep['skip'] == 1)+ ({{ strtolower(trans('firefly.recurring_skips_one')) }})@endif- {% if rep.repetition_skip > 1 %}- ({{ trans('firefly.recurring_skips_more', {count: rep.repetition_skip})|lower }})+ @if($rep['skip'] > 1)+ ({{ strtolower(trans('firefly.recurring_skips_more', ['count' => $rep['skip']])) }})@endif</strong></p><table class="table" aria-label="Table"><tbody>- {% for occ in rep.occurrences %}+ @foreach($rep['occurrences'] as $occ)<tr>- <th scope="row">{{ occ.date.isoFormat(trans('config.month_and_date_day_js')) }}</th>+ <th scope="row">{{ $occ['date']->isoFormat(trans('config.month_and_date_day_js')) }}</th><td>- {% if not occ.fired %}- <form action="{{ route('recurring.trigger', [recurrence.id]) }}" method="post"+ @if(!$occ['fired'])+ <form action="{{ route('recurring.trigger', [$recurrence['id']]) }}" method="post"class="inline"><input type="hidden" name="_token" value="{{ csrf_token() }}"><input type="hidden" name="date"- value="{{ occ.date.isoFormat('YYYY-MM-DD') }}">- <input type="submit" name="submit" value="{{ 'create_right_now'|_ }}"+ value="{{ $occ['date']->isoFormat('YYYY-MM-DD') }}">+ <input type="submit" name="submit" value="{{ __('firefly.create_right_now') }}"class="btn btn-sm btn-outline-secondary"></form>@endif@@ -109,7 +106,7 @@</div><div class="card-footer"><small>- <em>{{ 'warning_duplicates_repetitions'|_ }}</em>+ <em>{{ __('firefly.warning_duplicates_repetitions') }}</em></small></div></div>@@ -121,7 +118,7 @@<div class="card mb-2"><div class="card-header"><h3 class="card-title">- {{ 'transaction_data'|_ }}+ {{ __('firefly.transaction_data') }}</h3></div><div class="card-body p-0">@@ -138,53 +135,53 @@</tr></thead><tbody>- {% for transaction in array.transactions %}+ @foreach($array['transactions'] as $transaction)<tr>- <td data-value="{{ transaction.description }}">- {{ transaction.description }}+ <td data-value="{{ $transaction['description'] }}">+ {{ $transaction['description'] }}</td>- <td data-value="{{ transaction.source_name }}">- <a href="{{ route('accounts.show', [transaction.source_id]) }}">{{ transaction.source_name }}</a>+ <td data-value="{{ $transaction['source_name'] }}">+ <a href="{{ route('accounts.show', [$transaction['source_id']]) }}">{{ $transaction['source_name'] }}</a></td>- <td data-value="{{ transaction.destination_name }}">- <a href="{{ route('accounts.show', [transaction.destination_id]) }}">{{ transaction.destination_name }}</a>+ <td data-value="{{ $transaction['destination_name'] }}">+ <a href="{{ route('accounts.show', [$transaction['destination_id']]) }}">{{ $transaction['destination_name'] }}</a></td><td>- {!! format_amount_by_symbol(transaction.amount,transaction.currency_symbol,transaction.currency_decimal_places) }}- {% if null != transaction.foreign_amount %}- ({!! format_amount_by_symbol(transaction.foreign_amount,transaction.foreign_currency_symbol,transaction.foreign_currency_decimal_places) }})+ {!! format_amount_by_symbol($transaction['amount'],$transaction['currency_symbol'],$transaction['currency_decimal_places']) !!}+ @if(null != $transaction['foreign_amount'])+ ({!! format_amount_by_symbol($transaction['foreign_amount'],$transaction['foreign_currency_symbol'],$transaction['foreign_currency_decimal_places']) !!})@endif</td>- <td data-value="{{ transaction.category_id|default(0) }}">- {% if '' != transaction.category_name %}- <a href="{{ route('categories.show', [transaction.category_id]) }}">- {{ transaction.category_name }}+ <td data-value="{{ $transaction['category_id'] ?? 0 }}">+ @if('' != $transaction['category_name'])+ <a href="{{ route('categories.show', [$transaction['category_id']]) }}">+ {{ $transaction['category_name'] }}</a>@endif</td>- <td data-value="{{ transaction.budget_id|default(0) }}">- {% if '' != transaction.budget_name %}- <a href="{{ route('budgets.show', [transaction.budget_id]) }}">- {{ transaction.budget_name }}+ <td data-value="{{ $transaction['budget_id'] ?? 0 }}">+ @if('' != $transaction['budget_name'])+ <a href="{{ route('budgets.show', [$transaction['budget_id']]) }}">+ {{ $transaction['budget_name'] }}</a>@endif</td><td>- {% if transaction.tags|length > 0 %}+ @if(count($transaction['tags']) > 0)<p>- {% for tag in transaction.tags %}- <span class="badge text-bg-success">{{ tag }}</span>+ @foreach($transaction['tags'] as $tag)+ <span class="badge text-bg-success">{{ $tag }}</span>@endforeach</p>@endif- {% if 0 != transaction.piggy_bank_id %}+ @if(0 != $transaction['piggy_bank_id'])<p>- <a href="{{ route('piggy-banks.show', [transaction.piggy_bank_id]) }}">{{ transaction.piggy_bank_name }}</a>+ <a href="{{ route('piggy-banks.show', [$transaction['piggy_bank_id']]) }}">{{ $transaction['piggy_bank_name'] }}</a></p>@endif- {% if 0 != transaction.bill_id %}+ @if(0 != $transaction['subscription_id'])<p>- <a href="{{ route('subscriptions.show', [transaction.bill_id]) }}">{{ transaction.bill_name }}</a>+ <a href="{{ route('subscriptions.show', [$transaction['subscription_id']]) }}">{{ $transaction['subscription_name'] }}</a></p>@endif</td>@@ -201,7 +198,7 @@<div class="card mb-2"><div class="card-header"><h3 class="card-title">- {{ ('created_'~array.type~'s')|_ }}+ {{ __('firefly.created_' . $array['type'] . 's') }}</h3></div><div class="card-body">diff --git a/resources/views/reports/partials/exp-not-grouped.blade.php b/resources/views/reports/partials/exp-not-grouped.blade.phpindex f1486c3412..9185699201 100644--- a/resources/views/reports/partials/exp-not-grouped.blade.php+++ b/resources/views/reports/partials/exp-not-grouped.blade.php@@ -1,3 +1,5 @@+UNUSED, I THINK?+{{--<table class="table table-hover sortable"><thead><tr>@@ -31,3 +33,4 @@@endforeach</tbody></table>+--}}diff --git a/resources/views/reports/partials/journals-audit.blade.php b/resources/views/reports/partials/journals-audit.blade.phpdeleted file mode 100644index 803bd46335..0000000000--- a/resources/views/reports/partials/journals-audit.blade.php+++ /dev/null@@ -1,189 +0,0 @@-<table class="table table-hover table-sm table-responsive ">- <thead>- <tr class="ignore">- <th class="hide-buttons"> </th>- <th class="hide-icon"> </th>-- <th class="hide-description">{{ trans('list.description') }}</th>- <th class="text-end hide-balance_before">{{ trans('list.balance_before') }}</th>- <th class="text-end hide-amount">{{ trans('list.amount') }}</th>- <th class="text-end hide-balance_after">{{ trans('list.balance_after') }}</th>-- <th class="hide-date">{{ trans('list.date') }}</th>- {{-- new optional fields (3x) --}}- <th class="hide-from">{{ trans('list.from') }}</th>- <th class="hide-to">{{ trans('list.to') }}</th>-- <th class="hide-budget"><span class="bi bi-pie-chart" title="{{ trans('list.budget') }}"></span></th>- <th class="hide-category"><span class="bi bi-bookmark" title="{{ trans('list.category') }}"></span></th>- <th class="hide-bill">{{ trans('list.bill') }}</th>-- {{-- more optional fields (2x) --}}- <th class="hide-create_date">{{ trans('list.create_date') }}</th>- <th class="hide-update_date">{{ trans('list.update_date') }}</th>-- <th class="hide-notes">{{ trans('list.notes') }}</th>-- {{-- even more optional fields --}}- <th class="hide-interest_date">{{ trans('list.interest_date') }}</th>- <th class="hide-book_date">{{ trans('list.book_date') }}</th>- <th class="hide-process_date"> {{ trans('list.process_date') }}</th>- <th class="hide-due_date">{{ trans('list.due_date') }}</th>- <th class="hide-payment_date">{{ trans('list.payment_date') }}</th>- <th class="hide-invoice_date">{{ trans('list.invoice_date') }}</th>-- </tr>- </thead>- <tbody>- {% for journal in journals %}- <tr data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.id }}">-- <td class="hide-buttons">- <div class="btn-group btn-group-sm">- <a href="{{ route('transactions.edit',journal.transaction_group_id) }}" class="btn btn-xs btn-outline-secondary"><span class="bi bi-pencil"></span></a>- <a href="{{ route('transactions.delete',journal.transaction_group_id) }}" class="btn btn-xs btn-danger"><span class="bi bi-trash"></span></a>- </div>- </td>-- <td class="hide-icon">- {% if journal.transaction_type_type == 'Withdrawal' %}- <span class="bi bi-arrow-left" title="{{ trans('firefly.Withdrawal') }}"></span>- @endif-- {% if journal.transaction_type_type == 'Deposit' %}- <span class="bi bi-arrow-right" title="{{ trans('firefly.Deposit') }}"></span>- @endif-- {% if journal.transaction_type_type == 'Transfer' %}- <span class="bi bi-arrow-left-right" title="{{ trans('firefly.Deposit') }}"></span>- @endif-- {% if journal.transaction_type_type == 'Reconciliation' %}- <span class="bi bi-calculator" title="{{ trans('firefly.reconciliation_transaction') }}"></span>- @endif-- {% if journal.transaction_type_type == 'Opening balance' %}- <span class="bi bi-star" title="{{ trans('firefly.Opening balance') }}"></span>- @endif-- </td>-- <td class="hide-description">- <a href="{{ route('transactions.show',journal.transaction_group_id) }}">- {% if journal.group_title|length > 0 %}- {{ journal.group_title }} ({{ journal.description }})- @else- {{ journal.description }}- @endif- </a>- </td>-- <td class="text-end hide-balance_before">- {!! format_amount_by_symbol(journal.balance_before, auditData[$account->id].currency.symbol, auditData[$account->id].currency.decimal_places) }}- </td>- <td class="text-end hide-amount">-- {% if auditData[$account->id].currency.id == journal.currency_id %}- {% if $account['id'] == journal.destination_account_id and journal.transaction_type_type == 'Opening balance' %}- {!! format_amount_by_symbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}- {% elseif $account['id'] == journal.destination_account_id and journal.transaction_type_type == 'Deposit' %}- {!! format_amount_by_symbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}- {% elseif $account['id'] == journal.destination_account_id and journal.transaction_type_type == 'Transfer' %}- {!! format_amount_by_symbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}- @else- {!! format_amount_by_symbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }}- @endif- @endif-- {% if auditData[$account->id].currency.id == journal.foreign_currency_id %}- {% if $account['id'] == journal.destination_account_id and journal.transaction_type_type == 'Opening balance' %}- {!! format_amount_by_symbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}- {% elseif $account['id'] == journal.destination_account_id and journal.transaction_type_type == 'Deposit' %}- {!! format_amount_by_symbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}- {% elseif $account['id'] == journal.destination_account_id and journal.transaction_type_type == 'Transfer' %}- {!! format_amount_by_symbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}- @else- {!! format_amount_by_symbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places) }}- @endif- @endif-- </td>-- <td class="text-end hide-balance_after">- {!! format_amount_by_symbol(journal.balance_after, auditData[$account->id].currency.symbol, auditData[$account->id].currency.decimal_places) }}- </td>-- <td class="hide-date">{{ journal.date.isoFormat($monthAndDayFormat) }}</td>-- <td class="hide-from">- <a href="{{ route('accounts.show', [journal.source_account_id]) }}" title="{{ journal.source_account_iban|default(journal.source_account_name) }}">{{ journal.source_account_name }}</a>- </td>-- <td class="hide-to">- <a href="{{ route('accounts.show', [journal.destination_account_id]) }}" title="{{ journal.destination_account_iban|default(journal.destination_account_name) }}">{{ journal.destination_account_name }}</a>- </td>- <td class="hide-budget">- {% if journal.budget_id %}- <a href="{{ route('budgets.show', [journal.budget_id]) }}" title="{{ journal.budget_name }}">{{ journal.budget_name }}</a>- @endif- </td>- <td class="hide-category">- {% if journal.category_id %}- <a href="{{ route('categories.show', [$journal['category_id']]) }}" title="{{ journal['category_name'] }}">{{ journal['category_name'] }}</a>- @endif- </td>- <td class="hide-bill">- {% if journal.bill_id %}- <a href="{{ route('subscriptions.show', [journal.bill_id]) }}" title="{{ journal.bill_name }}">{{ journal.bill_name }}</a>- @endif- </td>-- <!-- new optional fields (2x) -->- <td class="hide-create_date">- {{ journal.created_at.isoFormat($dateTimeFormat) }}- </td>-- <td class="hide-update_date">- {{ journal.updated_at.isoFormat($dateTimeFormat) }}- </td>- <td class="hide-notes">- {{ journal.notes|default('')|markdown }}- </td>-- <!-- more new dates -->- <td class="hide-interest_date">- {% if null != journal.interest_date %}- {{ journal.interest_date.isoFormat($monthAndDayFormat) }}- @endif- </td>- <td class="hide-book_date">- {% if null != journal.book_date %}- {{ journal.book_date.isoFormat($monthAndDayFormat) }}- @endif- </td>- <td class="hide-process_date">- {% if null != journal.process_date %}- {{ journal.process_date.isoFormat($monthAndDayFormat) }}- @endif- </td>- <td class="hide-due_date">- {% if null != journal.due_date %}- {{ journal.due_date.isoFormat($monthAndDayFormat) }}- @endif- </td>- <td class="hide-payment_date">- {% if null != journal.payment_date %}- {{ journal.payment_date.isoFormat($monthAndDayFormat) }}- @endif- </td>- <td class="hide-invoice_date">- {% if null != journal.invoice_date %}- {{ journal.invoice_date.isoFormat($monthAndDayFormat) }}- @endif- </td>- </tr>-- @endforeach-- </tbody>-</table>diff --git a/resources/views/reports/partials/top-transactions.blade.php b/resources/views/reports/partials/top-transactions.blade.phpindex cd893c1252..bc40bbf06a 100644--- a/resources/views/reports/partials/top-transactions.blade.php+++ b/resources/views/reports/partials/top-transactions.blade.php@@ -1,3 +1,5 @@+UNUSED, I THINK? 2+{{--<table class="table table-hover sortable"><thead><tr>@@ -30,3 +32,4 @@@endforeach</tbody></table>+--}}