mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Bunq and Spectre will ask to apply rules.
This commit is contained in:
@@ -76,10 +76,11 @@ class ChooseAccountsHandler implements BunqJobConfigurationInterface
|
||||
*/
|
||||
public function configureJob(array $data): MessageBag
|
||||
{
|
||||
$config = $this->repository->getConfiguration($this->importJob);
|
||||
$accounts = $config['accounts'] ?? [];
|
||||
$mapping = $data['account_mapping'] ?? [];
|
||||
$final = [];
|
||||
$config = $this->repository->getConfiguration($this->importJob);
|
||||
$accounts = $config['accounts'] ?? [];
|
||||
$mapping = $data['account_mapping'] ?? [];
|
||||
$applyRules = (int)$data['apply_rules'] === 1;
|
||||
$final = [];
|
||||
if (\count($accounts) === 0) {
|
||||
throw new FireflyException('No bunq accounts found. Import cannot continue.'); // @codeCoverageIgnore
|
||||
}
|
||||
@@ -98,7 +99,8 @@ class ChooseAccountsHandler implements BunqJobConfigurationInterface
|
||||
$accountId = $this->validLocalAccount($localId);
|
||||
$final[$bunqId] = $accountId;
|
||||
}
|
||||
$config['mapping'] = $final;
|
||||
$config['mapping'] = $final;
|
||||
$config['apply-rules'] = $applyRules;
|
||||
$this->repository->setConfiguration($this->importJob, $config);
|
||||
|
||||
return new MessageBag;
|
||||
|
@@ -45,11 +45,6 @@ class NewBunqJobHandler implements BunqJobConfigurationInterface
|
||||
*/
|
||||
public function configurationComplete(): bool
|
||||
{
|
||||
// simply set the job configuration "apply-rules" to true.
|
||||
$config = $this->repository->getConfiguration($this->importJob);
|
||||
$config['apply-rules'] = true;
|
||||
$this->repository->setConfiguration($this->importJob, $config);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user