Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix https://github.com/firefly-iii/firefly-iii/issues/6333
James Cole9c2f771bae5f
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.phpindex dba8f5e4d8..9e90abf404 100644--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@ -438,7 +438,7 @@ class AccountController extends Controller$cache->addProperty($end);$cache->addProperty($account->id);if ($cache->has()) {- //return response()->json($cache->get());+ return response()->json($cache->get());}$currencies = $this->accountRepository->getUsedCurrencies($account);diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.phpindex 58bb2ece98..e58025f58a 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -99,7 +99,7 @@ class BudgetController extends Controller$cache->addProperty($budget->id);if ($cache->has()) {- //return response()->json($cache->get());+ return response()->json($cache->get());}$step = $this->calculateStep($start, $end); // depending on diff, do something with range of chart.$collection = new Collection([$budget]);diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.phpindex 8eb910ac80..9d8950bd24 100644--- a/app/Http/Controllers/Chart/ReportController.php+++ b/app/Http/Controllers/Chart/ReportController.php@@ -181,28 +181,31 @@ class ReportController extends Controller$period = $journal['date']->format($format);$currencyId = (int) $journal['currency_id'];$data[$currencyId] = $data[$currencyId] ?? [- 'currency_id' => $currencyId,- 'currency_symbol' => $journal['currency_symbol'],- 'currency_code' => $journal['currency_code'],- 'currency_name' => $journal['currency_name'],- 'currency_decimal_places' => (int) $journal['currency_decimal_places'],- ];+ 'currency_id' => $currencyId,+ 'currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],+ 'currency_name' => $journal['currency_name'],+ 'currency_decimal_places' => (int) $journal['currency_decimal_places'],+ ];$data[$currencyId][$period] = $data[$currencyId][$period] ?? [- 'period' => $period,- 'spent' => '0',- 'earned' => '0',- ];+ 'period' => $period,+ 'spent' => '0',+ 'earned' => '0',+ ];// in our outgoing?$key = 'spent';$amount = app('steam')->positive($journal['amount']);+ // deposit = incoming+ // transfer or reconcile or opening balance, and these accounts are the destination.if (TransactionType::DEPOSIT === $journal['transaction_type_type']- || // deposit = incoming- // transfer or opening balance, and these accounts are the destination.+ ||+((TransactionType::TRANSFER === $journal['transaction_type_type']+ || TransactionType::RECONCILIATION === $journal['transaction_type_type']|| TransactionType::OPENING_BALANCE === $journal['transaction_type_type'])&& in_array($journal['destination_account_id'], $ids, true)diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.phpindex 9a8ac019e8..3c0873af56 100644--- a/app/Http/Controllers/Json/BoxController.php+++ b/app/Http/Controllers/Json/BoxController.php@@ -73,7 +73,7 @@ class BoxController extends Controller$cache->addProperty($today);$cache->addProperty('box-available');if ($cache->has()) {- //return response()->json($cache->get());+ return response()->json($cache->get());}$leftPerDayAmount = '0';$leftToSpendAmount = '0';