Fix for issue with null amounts.

This commit is contained in:
James Cole 2019-11-11 18:25:35 +01:00
parent 8ce156cf93
commit 88f1adf650
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -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',