From 88f1adf65054e6cb5436415cd98aee58ee346145 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 11 Nov 2019 18:25:35 +0100 Subject: [PATCH] Fix for issue with null amounts. --- app/Support/Http/Controllers/PeriodOverview.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index 24b6006e8b..8fbabcde6c 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -575,8 +575,7 @@ trait PeriodOverview $return[$currencyId]['amount'] = bcadd($return[$currencyId]['amount'], $journal['amount'] ?? '0'); $return[$currencyId]['count']++; - - if (null !== $foreignCurrencyId) { + if (null !== $foreignCurrencyId && null !== $journal['foreign_amount']) { if (!isset($return[$foreignCurrencyId])) { $return[$foreignCurrencyId] = [ 'amount' => '0',