From 4fbf7b38fbacd044b216dc772efb44332d0138d7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 21 Dec 2024 11:40:34 +0100 Subject: [PATCH] Do not pull in invalid transactions --- app/Helpers/Collector/GroupCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php index 00329c2ce8..ce9e16742c 100644 --- a/app/Helpers/Collector/GroupCollector.php +++ b/app/Helpers/Collector/GroupCollector.php @@ -463,7 +463,6 @@ class GroupCollector implements GroupCollectorInterface $this->query->orWhereIn('transaction_journals.transaction_group_id', $groupIds); } $result = $this->query->get($this->fields); - // now to parse this into an array. $collection = $this->parseArray($result); @@ -1049,6 +1048,7 @@ class GroupCollector implements GroupCollectorInterface ->whereNull('transaction_groups.deleted_at') ->whereNull('transaction_journals.deleted_at') ->whereNull('source.deleted_at') + ->whereNotNull('transaction_groups.id') ->whereNull('destination.deleted_at') ->orderBy('transaction_journals.date', 'DESC') ->orderBy('transaction_journals.order', 'ASC')