mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Updates for new Sandstorm package.
This commit is contained in:
@@ -80,7 +80,7 @@ class AccountTasker implements AccountTaskerInterface
|
||||
$entry['end_balance'] = $endSet[$account->id] ?? '0';
|
||||
|
||||
// first journal exists, and is on start, then this is the actual opening balance:
|
||||
if (null !== $first->id && $first->date->isSameDay($start)) {
|
||||
if (null !== $first && $first->date->isSameDay($start)) {
|
||||
Log::debug(sprintf('Date of first journal for %s is %s', $account->name, $first->date->format('Y-m-d')));
|
||||
$entry['start_balance'] = $first->transactions()->where('account_id', $account->id)->first()->amount;
|
||||
Log::debug(sprintf('Account %s was opened on %s, so opening balance is %f', $account->name, $start->format('Y-m-d'), $entry['start_balance']));
|
||||
|
Reference in New Issue
Block a user