mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-03 20:55:05 +00:00 
			
		
		
		
	Fix for #3154
This commit is contained in:
		@@ -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());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user