mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #2332
This commit is contained in:
parent
3dbde59787
commit
59801b8bc1
@ -95,6 +95,7 @@ class SummaryController extends Controller
|
|||||||
$dates = $request->getAll();
|
$dates = $request->getAll();
|
||||||
$start = $dates['start'];
|
$start = $dates['start'];
|
||||||
$end = $dates['end'];
|
$end = $dates['end'];
|
||||||
|
$code = $request->get('currency_code');
|
||||||
|
|
||||||
// balance information:
|
// balance information:
|
||||||
$balanceData = $this->getBalanceInformation($start, $end);
|
$balanceData = $this->getBalanceInformation($start, $end);
|
||||||
@ -103,9 +104,15 @@ class SummaryController extends Controller
|
|||||||
$networthData = $this->getNetWorthInfo($start, $end);
|
$networthData = $this->getNetWorthInfo($start, $end);
|
||||||
$total = array_merge($balanceData, $billData, $spentData, $networthData);
|
$total = array_merge($balanceData, $billData, $spentData, $networthData);
|
||||||
|
|
||||||
// TODO: liabilities with icon line-chart
|
// give new keys
|
||||||
|
$return = [];
|
||||||
|
foreach ($total as $entry) {
|
||||||
|
if (null === $code || (null !== $code && $code === $entry['currency_code'])) {
|
||||||
|
$return[$entry['key']] = $entry;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json($total);
|
return response()->json($return);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user