mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Fix #3263
This commit is contained in:
@@ -237,7 +237,6 @@ trait AccountServiceTrait
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return $group;
|
||||
|
@@ -345,6 +345,7 @@ trait JournalServiceTrait
|
||||
*/
|
||||
private function createAccount(?Account $account, array $data, string $preferredType): Account
|
||||
{
|
||||
Log::debug('Now in createAccount()', $data);
|
||||
// return new account.
|
||||
if (null === $account) {
|
||||
$data['name'] = $data['name'] ?? '(no name)';
|
||||
@@ -362,6 +363,7 @@ trait JournalServiceTrait
|
||||
'virtual_balance' => null,
|
||||
'active' => true,
|
||||
'iban' => $data['iban'],
|
||||
'currency_id' => $data['currency_id'] ?? null,
|
||||
]
|
||||
);
|
||||
// store BIC
|
||||
@@ -376,6 +378,14 @@ trait JournalServiceTrait
|
||||
$metaFactory = app(AccountMetaFactory::class);
|
||||
$metaFactory->create(['account_id' => $account->id, 'name' => 'account_number', 'data' => $data['bic']]);
|
||||
}
|
||||
|
||||
// // store currency preference:
|
||||
// if (isset($data['currency_id']) && null !== $data['currency_id']) {
|
||||
// Log::debug(sprintf('Stored currency_id for account %d with value %d', $account->id, $data['currency_id']));
|
||||
// /** @var AccountMetaFactory $metaFactory */
|
||||
// $metaFactory = app(AccountMetaFactory::class);
|
||||
// $metaFactory->create(['account_id' => $account->id, 'name' => 'currency_id', 'data' => $data['currency_id']]);
|
||||
// }
|
||||
}
|
||||
|
||||
return $account;
|
||||
|
Reference in New Issue
Block a user