mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 20:38:57 +00:00
Some refactoring.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Shared\Toolkit;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class Steam
|
||||
*/
|
||||
public function balance(\Account $account, Carbon $date = null)
|
||||
{
|
||||
\Log::debug('Now in Steam::balance() for account #' . $account->id.' ('.$account->name.')');
|
||||
\Log::debug('Now in Steam::balance() for account #' . $account->id . ' (' . $account->name . ')');
|
||||
if (is_null($date)) {
|
||||
$key = 'account.' . $account->id . '.latestBalance';
|
||||
} else {
|
||||
@@ -33,7 +33,7 @@ class Steam
|
||||
// TODO find a way to reliably remove cache entries for accounts.
|
||||
#return \Cache::get($key);
|
||||
}
|
||||
$date = is_null($date) ? Carbon::now() : $date;
|
||||
$date = is_null($date) ? Carbon::now() : $date;
|
||||
\Log::debug('Now reached the moment we fire the query.');
|
||||
$balance = floatval(
|
||||
$account->transactions()->leftJoin(
|
||||
|
||||
Reference in New Issue
Block a user