From c269be7f0704d1344ecbcef1625d73edc0746ec7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 29 Dec 2023 20:39:49 +0100 Subject: [PATCH] Skip irrelevant tags. --- app/Http/Controllers/Report/TagController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Report/TagController.php b/app/Http/Controllers/Report/TagController.php index e352ac3aaf..3b8fb687bb 100644 --- a/app/Http/Controllers/Report/TagController.php +++ b/app/Http/Controllers/Report/TagController.php @@ -386,7 +386,9 @@ class TagController extends Controller /** @var array $tag */ foreach ($currency['tags'] as $tag) { $tagId = $tag['id']; - + if(!array_key_exists($tagId, $report)) { + continue; + } foreach ($tag['transaction_journals'] as $journal) { // add currency info to report array: $report[$tagId]['currencies'][$currencyId] ??= [ @@ -422,7 +424,9 @@ class TagController extends Controller /** @var array $tag */ foreach ($currency['tags'] as $tag) { $tagId = $tag['id']; - + if(!array_key_exists($tagId, $report)) { + continue; + } foreach ($tag['transaction_journals'] as $journal) { // add currency info to report array: $report[$tagId]['currencies'][$currencyId] ??= [