mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Rebuild new layout.
This commit is contained in:
@@ -407,9 +407,6 @@ trait AccountServiceTrait
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $group;
|
||||
}
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@ trait JournalServiceTrait
|
||||
* @return Account
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function createAccount(?Account $account, array $data, string $preferredType): Account
|
||||
private function createAccount(?Account $account, array $data, string $preferredType): ?Account
|
||||
{
|
||||
Log::debug('Now in createAccount()', $data);
|
||||
// return new account.
|
||||
@@ -192,7 +192,15 @@ trait JournalServiceTrait
|
||||
Log::debug(sprintf('Account name is now IBAN ("%s")', $data['iban']));
|
||||
$data['name'] = $data['iban'];
|
||||
}
|
||||
|
||||
// fix name of account if only number is given:
|
||||
if ('' === (string)$data['name'] && '' !== (string)$data['number']) {
|
||||
Log::debug(sprintf('Account name is now account number ("%s")', $data['number']));
|
||||
$data['name'] = $data['number'];
|
||||
}
|
||||
// if name is still NULL, return NULL.
|
||||
if(null === $data['name']) {
|
||||
return null;
|
||||
}
|
||||
$data['name'] = $data['name'] ?? '(no name)';
|
||||
|
||||
$account = $this->accountRepository->store(
|
||||
|
Reference in New Issue
Block a user