diff --git a/app/Http/Controllers/Report/TagController.php b/app/Http/Controllers/Report/TagController.php index 7da4514f8b..b52ceead31 100644 --- a/app/Http/Controllers/Report/TagController.php +++ b/app/Http/Controllers/Report/TagController.php @@ -31,7 +31,6 @@ use FireflyIII\Models\Tag; use FireflyIII\Repositories\Tag\OperationsRepositoryInterface; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; -use Illuminate\Support\Facades\Log; use Illuminate\View\View; /** @@ -95,10 +94,10 @@ class TagController extends Controller $report[$sourceAccountId]['currencies'][$currencyId]['tags'][$tagId] ??= [ - 'spent' => '0', - 'earned' => '0', - 'sum' => '0', - ]; + 'spent' => '0', + 'earned' => '0', + 'sum' => '0', + ]; $report[$sourceAccountId]['currencies'][$currencyId]['tags'][$tagId]['spent'] = bcadd( $report[$sourceAccountId]['currencies'][$currencyId]['tags'][$tagId]['spent'], $journal['amount'] @@ -121,18 +120,18 @@ class TagController extends Controller $destinationId = $journal['destination_account_id']; $report[$destinationId]['currencies'][$currencyId] ??= [ - 'currency_id' => $currency['currency_id'], - 'currency_symbol' => $currency['currency_symbol'], - 'currency_name' => $currency['currency_name'], - 'currency_decimal_places' => $currency['currency_decimal_places'], - 'tags' => [], - ]; + 'currency_id' => $currency['currency_id'], + 'currency_symbol' => $currency['currency_symbol'], + 'currency_name' => $currency['currency_name'], + 'currency_decimal_places' => $currency['currency_decimal_places'], + 'tags' => [], + ]; $report[$destinationId]['currencies'][$currencyId]['tags'][$tagId] ??= [ - 'spent' => '0', - 'earned' => '0', - 'sum' => '0', - ]; + 'spent' => '0', + 'earned' => '0', + 'sum' => '0', + ]; $report[$destinationId]['currencies'][$currencyId]['tags'][$tagId]['earned'] = bcadd( $report[$destinationId]['currencies'][$currencyId]['tags'][$tagId]['earned'], $journal['amount'] @@ -446,6 +445,7 @@ class TagController extends Controller } } } + return view('reports.tag.partials.tags', compact('sums', 'report')); } diff --git a/app/Repositories/Tag/OperationsRepository.php b/app/Repositories/Tag/OperationsRepository.php index c12f583a41..be11f64ef4 100644 --- a/app/Repositories/Tag/OperationsRepository.php +++ b/app/Repositories/Tag/OperationsRepository.php @@ -80,7 +80,7 @@ class OperationsRepository implements OperationsRepositoryInterface $tagId = (int)$tag['id']; $tagName = (string)$tag['name']; $journalId = (int)$journal['transaction_journal_id']; - if(!in_array($tagId, $tagIds, true)){ + if(!in_array($tagId, $tagIds, true)) { continue; } @@ -160,7 +160,7 @@ class OperationsRepository implements OperationsRepositoryInterface // may have multiple tags: foreach ($journal['tags'] as $tag) { - if(!in_array($tagId, $tagIds, true)){ + if(!in_array($tagId, $tagIds, true)) { continue; } $tagId = (int)$tag['id']; diff --git a/resources/views/errors/404.twig b/resources/views/errors/404.twig index 182984dc8e..4b696563c9 100644 --- a/resources/views/errors/404.twig +++ b/resources/views/errors/404.twig @@ -37,6 +37,11 @@
+ {{ exception.message }} +
+ {% endif %}{{ trans('errors.404_page_does_not_exist') }}