mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-18 12:33:07 -06:00
Remove income from category chart #3517
This commit is contained in:
parent
45f5a38512
commit
34fd66c835
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user