diff --git a/app/Http/Controllers/Banking/Accounts.php b/app/Http/Controllers/Banking/Accounts.php index 1d48ef5e3..03f3b4e75 100644 --- a/app/Http/Controllers/Banking/Accounts.php +++ b/app/Http/Controllers/Banking/Accounts.php @@ -12,6 +12,7 @@ use App\Models\Banking\Transaction; use App\Models\Banking\Transfer; use App\Utilities\Reports as Utility; use App\Models\Setting\Currency; +use Date; class Accounts extends Controller { @@ -244,7 +245,11 @@ class Accounts extends Controller public function seePerformance(Account $account) { - $data['account_id'] = $account->id; + $data = [ + 'year' => Date::now()->year, + 'basis' => 'accrual', + 'account_id' => $account->id, + ]; $report = Utility::getClassInstance('App\Reports\IncomeExpenseSummary'); diff --git a/app/Listeners/Report/AddSearchString.php b/app/Listeners/Report/AddSearchString.php index 1e655395e..bad9f0c85 100644 --- a/app/Listeners/Report/AddSearchString.php +++ b/app/Listeners/Report/AddSearchString.php @@ -40,7 +40,11 @@ class AddSearchString extends Listener } foreach ($old as $key => $value) { - $filters[] = $key . ':' . $value; + $filter = $key . ':' . $value; + + if (!in_array($filter, $filters)) { + $filters[] = $filter; + } } foreach ($request as $key => $value) {