Ok this fix for #9797 goes out to @nebster9k who is delightfully stubborn and absolutely correct.

This commit is contained in:
James Cole
2025-02-12 06:38:21 +01:00
parent 1b4655fd70
commit d3b2748c8f
2 changed files with 19 additions and 8 deletions

View File

@@ -426,7 +426,6 @@ class AccountController extends Controller
$end->endOfDay();
// TODO not sure if these date ranges will work as expected.
Log::debug(sprintf('Now in period("%s", "%s")', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
$chartData = [];
$cache = new CacheProperties();
$cache->addProperty('chart.account.period');
$cache->addProperty($start);
@@ -455,9 +454,7 @@ class AccountController extends Controller
$range = Steam::filterAccountBalances($range, $account, $this->convertToNative, $accountCurrency);
// temp, get end balance.
Log::debug('temp get end balance');
Log::debug(sprintf('period: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
// correct
Steam::finalAccountBalance($account, $end);
Log::debug('END temp get end balance done');
@@ -510,7 +507,7 @@ class AccountController extends Controller
$chartData = [];
foreach ($return as $key => $info) {
if (3 === strlen($key)) {
if ('balance' !== $key && 'native_balance' !== $key) {
// assume it's a currency:
$setCurrency = $this->currencyRepository->findByCode($key);
$info['currency_symbol'] = $setCurrency->symbol;