James Cole 2024-07-24 14:57:51 +02:00
parent fdd93427aa
commit a0aef5d579
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
2 changed files with 5 additions and 0 deletions

View File

@ -121,6 +121,10 @@ class AccountBalanceCalculator
$sumAmount = '' === $sumAmount ? '0' : $sumAmount;
$sumForeignAmount = '' === $sumForeignAmount ? '0' : $sumForeignAmount;
// at this point SQLite may return scientific notation because why not. Terrible.
$sumAmount = app('steam')->floatalize($sumAmount);
$sumForeignAmount = app('steam')->floatalize($sumForeignAmount);
// first create for normal currency:
$entry = $this->getAccountBalanceByAccount($account, $transactionCurrency);

View File

@ -836,6 +836,7 @@ class Steam
if (!str_contains($value, 'E')) {
return $value;
}
Log::debug(sprintf('Floatalizing %s', $value));
$number = substr($value, 0, (int)strpos($value, 'E'));
if (str_contains($number, '.')) {