From 9a8ddf5c05e0c45609a4c033595a619c844b126f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 8 Oct 2017 10:14:26 +0200 Subject: [PATCH] Some debug for #916 --- app/Helpers/Collector/JournalCollector.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index f0e84c26de..28116cd052 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -314,6 +314,7 @@ class JournalCollector implements JournalCollectorInterface return $this; } $this->joinBudgetTables(); + Log::debug('Journal collector will filter for budgets', $budgetIds); $this->query->where( function (EloquentBuilder $q) use ($budgetIds) { @@ -433,8 +434,11 @@ class JournalCollector implements JournalCollectorInterface public function setRange(Carbon $start, Carbon $end): JournalCollectorInterface { if ($start <= $end) { - $this->query->where('transaction_journals.date', '>=', $start->format('Y-m-d')); - $this->query->where('transaction_journals.date', '<=', $end->format('Y-m-d')); + $startStr = $start->format('Y-m-d'); + $endStr = $end->format('Y-m-d'); + $this->query->where('transaction_journals.date', '>=', $startStr); + $this->query->where('transaction_journals.date', '<=', $endStr); + Log::debug(sprintf('JournalCollector range is now %s - %s (inclusive)', $startStr, $endStr)); } return $this;