mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 02:40:43 -06:00
Fix opening balance bug #214
This commit is contained in:
parent
f6303deaa4
commit
ccad52b80f
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user