mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
This commit is contained in:
@@ -143,7 +143,7 @@ class ReportController extends Controller
|
|||||||
$cache->addProperty($accounts);
|
$cache->addProperty($accounts);
|
||||||
$cache->addProperty($end);
|
$cache->addProperty($end);
|
||||||
if ($cache->has()) {
|
if ($cache->has()) {
|
||||||
return response()->json($cache->get());
|
// return response()->json($cache->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
app('log')->debug('Going to do operations for accounts ', $accounts->pluck('id')->toArray());
|
app('log')->debug('Going to do operations for accounts ', $accounts->pluck('id')->toArray());
|
||||||
@@ -220,11 +220,14 @@ class ReportController extends Controller
|
|||||||
$currentEnd = app('navigation')->endOfPeriod($currentEnd, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentEnd, $preferredRange);
|
||||||
}
|
}
|
||||||
while ($currentStart <= $currentEnd) {
|
while ($currentStart <= $currentEnd) {
|
||||||
$key = $currentStart->format($format);
|
$key = $currentStart->format($format);
|
||||||
$title = $currentStart->isoFormat($titleFormat);
|
$title = $currentStart->isoFormat($titleFormat);
|
||||||
$income['entries'][$title] = app('steam')->bcround($currency[$key]['earned'] ?? '0', $currency['currency_decimal_places']);
|
// #8663 make sure the period exists in the data previously collected.
|
||||||
$expense['entries'][$title] = app('steam')->bcround($currency[$key]['spent'] ?? '0', $currency['currency_decimal_places']);
|
if (array_key_exists($key, $currency)) {
|
||||||
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);
|
$income['entries'][$title] = app('steam')->bcround($currency[$key]['earned'] ?? '0', $currency['currency_decimal_places']);
|
||||||
|
$expense['entries'][$title] = app('steam')->bcround($currency[$key]['spent'] ?? '0', $currency['currency_decimal_places']);
|
||||||
|
}
|
||||||
|
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$chartData[] = $income;
|
$chartData[] = $income;
|
||||||
|
Reference in New Issue
Block a user