Replace deprecated method.

This commit is contained in:
James Cole
2022-03-27 20:24:13 +02:00
parent 8ee4c2ea11
commit cbf14f541c
39 changed files with 140 additions and 123 deletions

View File

@@ -210,7 +210,7 @@ class DoubleReportController extends Controller
];
foreach ($currency['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
@@ -236,7 +236,7 @@ class DoubleReportController extends Controller
];
foreach ($currency['transaction_journals'] as $journal) {
$key = $journal['date']->formatLocalized($format);
$key = $journal['date']->isoFormat($format);
$amount = app('steam')->positive($journal['amount']);
$chartData[$earnedKey]['entries'][$key] = $chartData[$earnedKey]['entries'][$key] ?? '0';
$chartData[$earnedKey]['entries'][$key] = bcadd($chartData[$earnedKey]['entries'][$key], $amount);
@@ -289,7 +289,7 @@ class DoubleReportController extends Controller
$currentStart = clone $start;
while ($currentStart <= $end) {
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
$key = $currentStart->formatLocalized($format);
$key = $currentStart->isoFormat($format);
$return[$key] = '0';
$currentStart = clone $currentEnd;
$currentStart->addDay()->startOfDay();