mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-16 18:25:00 -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);
|
$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';
|
||||||
|
Loading…
Reference in New Issue
Block a user