mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fix opening balance bug #214
This commit is contained in:
@@ -450,8 +450,9 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
$this->updateMetadata($account, $data);
|
||||
$openingBalance = $this->openingBalanceTransaction($account);
|
||||
|
||||
if ($data['openingBalance'] != 0) {
|
||||
if ($openingBalance) {
|
||||
if (!is_null($openingBalance->id)) {
|
||||
$this->updateInitialBalance($account, $openingBalance, $data);
|
||||
} else {
|
||||
$type = $data['openingBalance'] < 0 ? 'expense' : 'revenue';
|
||||
|
Reference in New Issue
Block a user