Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix for income entry.
James Cole11385494ebed
diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.phpindex 7727114bfb..2a9ca73a4d 100644--- a/app/Http/Controllers/Popup/ReportController.php+++ b/app/Http/Controllers/Popup/ReportController.php@@ -223,11 +223,14 @@ class ReportController extends Controller$journals = $repository->journalsInPeriod(new Collection([$account]), $types, $attributes['startDate'], $attributes['endDate']);$destinations = $attributes['accounts']->pluck('id')->toArray();// filter for transfers and withdrawals FROM the given $account+$journals = $journals->filter(function (TransactionJournal $journal) use ($account, $destinations) {+ $currentSources = TransactionJournal::sourceAccountList($journal)->pluck('id')->toArray();+ $currentDest = TransactionJournal::destinationAccountList($journal)->pluck('id')->toArray();if (- $journal->source_account_id === $account->id- && in_array($journal->destination_account_id, $destinations)+ !empty(array_intersect([$account->id], $currentSources))+ && !empty(array_intersect($destinations, $currentDest))) {return true;}