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