Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix https://github.com/firefly-iii/firefly-iii/issues/12223
James Cole984e735bc14e
diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.phpindex cd99b43068..ff7046f9ac 100644--- a/app/Http/Controllers/Report/BudgetController.php+++ b/app/Http/Controllers/Report/BudgetController.php@@ -70,6 +70,7 @@ final class BudgetController extends Controller*/public function accountPerBudget(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end): Factory|\Illuminate\Contracts\View\View{+/** @var BudgetReportGenerator $generator */$generator = app(BudgetReportGenerator::class);@@ -90,6 +91,7 @@ final class BudgetController extends Controller*/public function accounts(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end): Factory|\Illuminate\Contracts\View\View{+$spent = $this->opsRepository->listExpenses($start, $end, $accounts, $budgets);$report = [];$sums = [];@@ -255,6 +257,7 @@ final class BudgetController extends Controller*/public function general(Collection $accounts, Carbon $start, Carbon $end){+/** @var BudgetReportGenerator $generator */$generator = app(BudgetReportGenerator::class);@@ -284,7 +287,7 @@ final class BudgetController extends Controller$cache->addProperty('budget-period-report');$cache->addProperty($accounts->pluck('id')->toArray());if ($cache->has()) {- return $cache->get();+ // return $cache->get();}$periods = Navigation::listOfPeriods($start, $end);@@ -292,7 +295,6 @@ final class BudgetController extends Controller// list expenses for budgets in account(s)$expenses = $this->opsRepository->listExpenses($start, $end, $accounts);-$report = [];foreach ($expenses as $currency) {foreach ($currency['budgets'] as $budget) {@@ -300,9 +302,12 @@ final class BudgetController extends Controllerforeach ($budget['transaction_journals'] as $journal) {// #10678// skip transactions between two asset / liability accounts.+ // #12223+ // must also be of the same type to be skippedif (in_array($journal['source_account_type'], config('firefly.valid_currency_account_types'), true)&& in_array($journal['destination_account_type'], config('firefly.valid_currency_account_types'), true)+ && $journal['source_account_type'] === $journal['destination_account_type']) {continue;}diff --git a/config/firefly.php b/config/firefly.phpindex e007c763b4..882ba1e1e1 100644--- a/config/firefly.php+++ b/config/firefly.php@@ -198,6 +198,7 @@ return ['default_locale' => env_default_when_empty(env('DEFAULT_LOCALE'), 'equal'),// account types that may have or set a currency+'valid_currency_account_types' => [AccountTypeEnum::ASSET->value,AccountTypeEnum::LOAN->value,