mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix for #3154
This commit is contained in:
parent
e4fa437f78
commit
542c64154c
@ -76,8 +76,15 @@ class Steam
|
||||
->where('transactions.transaction_currency_id', '!=', $currency->id)
|
||||
->sum('transactions.foreign_amount');
|
||||
|
||||
// check:
|
||||
Log::debug(sprintf('Steam::balance. Native balance is "%s"', $nativeBalance));
|
||||
Log::debug(sprintf('Steam::balance. Foreign balance is "%s"', $foreignBalance));
|
||||
|
||||
$balance = bcadd($nativeBalance, $foreignBalance);
|
||||
$virtual = null === $account->virtual_balance ? '0' : (string)$account->virtual_balance;
|
||||
|
||||
Log::debug(sprintf('Steam::balance. Virtual balance is "%s"', $virtual));
|
||||
|
||||
$balance = bcadd($balance, $virtual);
|
||||
$cache->store($balance);
|
||||
|
||||
|
@ -147,7 +147,7 @@ class General extends AbstractExtension
|
||||
'balance',
|
||||
static function (?Account $account): string {
|
||||
if (null === $account) {
|
||||
return 'NULL';
|
||||
return '0';
|
||||
}
|
||||
/** @var Carbon $date */
|
||||
$date = session('end', Carbon::now()->endOfMonth());
|
||||
|
Loading…
Reference in New Issue
Block a user