mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-08 15:05:29 +00:00
Fix #7505
This commit is contained in:
@@ -154,6 +154,9 @@ trait AccountServiceTrait
|
||||
if (is_bool($data[$field]) && true === $data[$field]) {
|
||||
$data[$field] = 1;
|
||||
}
|
||||
if($data[$field] instanceof Carbon) {
|
||||
$data[$field] = $data[$field]->toAtomString();
|
||||
}
|
||||
|
||||
$factory->crud($account, $field, (string)$data[$field]);
|
||||
}
|
||||
|
||||
@@ -296,6 +296,7 @@ class AccountUpdateService
|
||||
$type = $account->accountType;
|
||||
if (in_array($type->type, $this->canHaveOpeningBalance, true)) {
|
||||
// check if is submitted as empty, that makes it valid:
|
||||
|
||||
if ($this->validOBData($data) && !$this->isEmptyOBData($data)) {
|
||||
$openingBalance = $data['opening_balance'];
|
||||
$openingBalanceDate = $data['opening_balance_date'];
|
||||
@@ -306,7 +307,6 @@ class AccountUpdateService
|
||||
$openingBalance
|
||||
);
|
||||
}
|
||||
|
||||
$this->updateOBGroupV2($account, $openingBalance, $openingBalanceDate);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user