mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Extra code for #1975
This commit is contained in:
@@ -151,7 +151,7 @@ class ChooseAccountsHandler implements SpectreJobConfigurationInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
// list the users accounts:
|
// list the users accounts:
|
||||||
$accounts = $this->accountRepository->getAccountsByType([AccountType::ASSET]);
|
$accounts = $this->accountRepository->getAccountsByType([AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE]);
|
||||||
|
|
||||||
$array = [];
|
$array = [];
|
||||||
/** @var AccountModel $account */
|
/** @var AccountModel $account */
|
||||||
|
@@ -233,8 +233,8 @@ class StageImportDataHandler
|
|||||||
if (null === $account) {
|
if (null === $account) {
|
||||||
throw new FireflyException(sprintf('Cannot find Firefly III asset account with ID #%d. Job must stop now.', $accountId)); // @codeCoverageIgnore
|
throw new FireflyException(sprintf('Cannot find Firefly III asset account with ID #%d. Job must stop now.', $accountId)); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
if ($account->accountType->type !== AccountType::ASSET) {
|
if (!\in_array($account->accountType->type ,[AccountType::ASSET, AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT], true)) {
|
||||||
throw new FireflyException(sprintf('Account with ID #%d is not an asset account. Job must stop now.', $accountId)); // @codeCoverageIgnore
|
throw new FireflyException(sprintf('Account with ID #%d is not an asset/loan/mortgage/debt account. Job must stop now.', $accountId)); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
|
Reference in New Issue
Block a user