This commit is contained in:
James Cole 2025-02-09 17:39:18 +01:00
parent 3aa946e028
commit 41ad35880d
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
2 changed files with 3 additions and 1 deletions

View File

@ -77,8 +77,9 @@ trait ChartGeneration
Log::debug(sprintf('Now at account #%d ("%s)', $account->id, $account->name));
$currency = $accountRepos->getAccountCurrency($account) ?? $default;
$useNative = $convertToNative && $default->id !== $currency->id;
$field = $useNative ? 'native_balance' : 'balance';
$field = $convertToNative ? 'native_balance' : 'balance';
$currency = $useNative ? $default : $currency;
Log::debug(sprintf('Will use field %s', $field));
$currentSet = [
'label' => $account->name,
'currency_symbol' => $currency->symbol,

View File

@ -68,6 +68,7 @@ class Steam
$cache->addProperty($account->id);
$cache->addProperty('final-balance-in-range');
$cache->addProperty($start);
$cache->addProperty($convertToNative);
$cache->addProperty($end);
if ($cache->has()) {
return $cache->get();