Possible fix for #2936

This commit is contained in:
James Cole 2020-01-01 13:56:54 +01:00
parent c193284471
commit cc09a15dcf
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -186,9 +186,9 @@ class ReportController extends Controller
// in our outgoing?
$key = 'spent';
$amount = app('steam')->positive($journal['amount']);
if (TransactionType::DEPOSIT === $journal['transaction_type_type'] ||
(TransactionType::TRANSFER === $journal['transaction_type_type']
&& in_array($journal['destination_account_id'], $ids, true)
if (TransactionType::DEPOSIT === $journal['transaction_type_type'] || ((TransactionType::TRANSFER === $journal['transaction_type_type']
|| TransactionType::OPENING_BALANCE === $journal['transaction_type_type'])
&& in_array($journal['destination_account_id'], $ids, true)
)) {
$key = 'earned';
}