diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index ff52b5f0f6..4ed3e8abb5 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -111,7 +111,7 @@ class CategoryController extends Controller $cache->addProperty($end); $cache->addProperty('chart.category.frontpage'); if ($cache->has()) { - // return response()->json($cache->get()); // @codeCoverageIgnore + return response()->json($cache->get()); // @codeCoverageIgnore } $frontPageGenerator = new FrontpageChartGenerator($start, $end); diff --git a/app/Support/Chart/Category/FrontpageChartGenerator.php b/app/Support/Chart/Category/FrontpageChartGenerator.php index d5a1b388b1..da3bee74db 100644 --- a/app/Support/Chart/Category/FrontpageChartGenerator.php +++ b/app/Support/Chart/Category/FrontpageChartGenerator.php @@ -89,12 +89,12 @@ class FrontpageChartGenerator foreach ($categories as $category) { // get expenses $collection[] = $this->collectExpenses($category, $accounts); - $collection[] = $this->collectIncome($category, $accounts); + //$collection[] = $this->collectIncome($category, $accounts); } // collect for no-category: $collection[] = $this->collectNoCatExpenses($accounts); - $collection[] = $this->collectNoCatIncome($accounts); + //$collection[] = $this->collectNoCatIncome($accounts); $tempData = array_merge(...$collection); @@ -231,14 +231,14 @@ class FrontpageChartGenerator 'currency_symbol' => $currency['currency_symbol'], 'entries' => $names, ]; - $key = sprintf('earned-%d', $currencyId); - $return[$key] = [ - 'label' => sprintf('%s (%s)', (string) trans('firefly.earned'), $currency['currency_name']), - 'type' => 'bar', - 'currency_symbol' => $currency['currency_symbol'], - 'data_type' => 'earned', - 'entries' => $names, - ]; + // $key = sprintf('earned-%d', $currencyId); + // $return[$key] = [ + // 'label' => sprintf('%s (%s)', (string) trans('firefly.earned'), $currency['currency_name']), + // 'type' => 'bar', + // 'currency_symbol' => $currency['currency_symbol'], + // 'data_type' => 'earned', + // 'entries' => $names, + // ]; } return $return;