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($end);
|
||||||
$cache->addProperty('chart.category.frontpage');
|
$cache->addProperty('chart.category.frontpage');
|
||||||
if ($cache->has()) {
|
if ($cache->has()) {
|
||||||
// return response()->json($cache->get()); // @codeCoverageIgnore
|
return response()->json($cache->get()); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
|
|
||||||
$frontPageGenerator = new FrontpageChartGenerator($start, $end);
|
$frontPageGenerator = new FrontpageChartGenerator($start, $end);
|
||||||
|
@ -89,12 +89,12 @@ class FrontpageChartGenerator
|
|||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
// get expenses
|
// get expenses
|
||||||
$collection[] = $this->collectExpenses($category, $accounts);
|
$collection[] = $this->collectExpenses($category, $accounts);
|
||||||
$collection[] = $this->collectIncome($category, $accounts);
|
//$collection[] = $this->collectIncome($category, $accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
// collect for no-category:
|
// collect for no-category:
|
||||||
$collection[] = $this->collectNoCatExpenses($accounts);
|
$collection[] = $this->collectNoCatExpenses($accounts);
|
||||||
$collection[] = $this->collectNoCatIncome($accounts);
|
//$collection[] = $this->collectNoCatIncome($accounts);
|
||||||
|
|
||||||
$tempData = array_merge(...$collection);
|
$tempData = array_merge(...$collection);
|
||||||
|
|
||||||
@ -231,14 +231,14 @@ class FrontpageChartGenerator
|
|||||||
'currency_symbol' => $currency['currency_symbol'],
|
'currency_symbol' => $currency['currency_symbol'],
|
||||||
'entries' => $names,
|
'entries' => $names,
|
||||||
];
|
];
|
||||||
$key = sprintf('earned-%d', $currencyId);
|
// $key = sprintf('earned-%d', $currencyId);
|
||||||
$return[$key] = [
|
// $return[$key] = [
|
||||||
'label' => sprintf('%s (%s)', (string) trans('firefly.earned'), $currency['currency_name']),
|
// 'label' => sprintf('%s (%s)', (string) trans('firefly.earned'), $currency['currency_name']),
|
||||||
'type' => 'bar',
|
// 'type' => 'bar',
|
||||||
'currency_symbol' => $currency['currency_symbol'],
|
// 'currency_symbol' => $currency['currency_symbol'],
|
||||||
'data_type' => 'earned',
|
// 'data_type' => 'earned',
|
||||||
'entries' => $names,
|
// 'entries' => $names,
|
||||||
];
|
// ];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
|
Loading…
Reference in New Issue
Block a user