mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-01 13:09:35 -06:00
Fixed null pointer in debug message [skip ci]
This commit is contained in:
parent
ed9e5b31fa
commit
3bf5040324
@ -127,12 +127,12 @@ class AccountTasker implements AccountTaskerInterface
|
||||
|
||||
// get first journal date:
|
||||
$first = $repository->oldestJournal($account);
|
||||
Log::debug(sprintf('Date of first journal for %s is %s', $account->name, $first->date->format('Y-m-d')));
|
||||
$entry['start_balance'] = $startSet[$account->id] ?? '0';
|
||||
$entry['end_balance'] = $endSet[$account->id] ?? '0';
|
||||
|
||||
// first journal exists, and is on start, then this is the actual opening balance:
|
||||
if (!is_null($first->id) && $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']));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user