mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add thing to apply rules to fints #2081
This commit is contained in:
@@ -59,17 +59,19 @@ class NewFinTSJobHandler implements FinTSConfigurationInterface
|
||||
$config['fints_bank_code'] = (string)($data['fints_bank_code'] ?? '');
|
||||
$config['fints_username'] = (string)($data['fints_username'] ?? '');
|
||||
$config['fints_password'] = (string)(Crypt::encrypt($data['fints_password']) ?? '');
|
||||
$config['apply-rules'] = 1 === (int)$data['apply_rules'];
|
||||
|
||||
$this->repository->setConfiguration($this->importJob, $config);
|
||||
|
||||
|
||||
$incomplete = false;
|
||||
foreach ($config as $value) {
|
||||
$incomplete = '' === $value or $incomplete;
|
||||
}
|
||||
|
||||
if ($incomplete) {
|
||||
return new MessageBag([trans('import.incomplete_fints_form')]);
|
||||
}
|
||||
|
||||
$finTS = app(FinTS::class, ['config' => $this->importJob->configuration]);
|
||||
if (true !== ($checkConnection = $finTS->checkConnection())) {
|
||||
return new MessageBag([trans('import.fints_connection_failed', ['originalError' => $checkConnection])]);
|
||||
|
Reference in New Issue
Block a user