From 30fc0fbf54c963b1d376c761f5b431abbe7696f9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 30 Jan 2022 16:53:57 +0100 Subject: [PATCH] Various new code. --- app/Support/Binder/EitherConfigKey.php | 1 + app/TransactionRules/Engine/SearchRuleEngine.php | 6 +++++- config/firefly.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Support/Binder/EitherConfigKey.php b/app/Support/Binder/EitherConfigKey.php index 7e129348ea..708740125c 100644 --- a/app/Support/Binder/EitherConfigKey.php +++ b/app/Support/Binder/EitherConfigKey.php @@ -46,6 +46,7 @@ class EitherConfigKey 'firefly.enable_external_map', 'firefly.expected_source_types', 'firefly.credit_card_types', + 'firefly.languages', 'app.timezone', ]; diff --git a/app/TransactionRules/Engine/SearchRuleEngine.php b/app/TransactionRules/Engine/SearchRuleEngine.php index 51bee50b61..113dedddb7 100644 --- a/app/TransactionRules/Engine/SearchRuleEngine.php +++ b/app/TransactionRules/Engine/SearchRuleEngine.php @@ -457,8 +457,12 @@ class SearchRuleEngine implements RuleEngineInterface private function processTransactionJournal(Rule $rule, array $transaction): void { Log::debug(sprintf('SearchRuleEngine:: Will now execute actions on transaction journal #%d', $transaction['transaction_journal_id'])); + $actions = $rule->ruleActions()->get(); /** @var RuleAction $ruleAction */ - foreach ($rule->ruleActions()->where('active', true)->get() as $ruleAction) { + foreach ($actions as $ruleAction) { + if(false === $ruleAction->active) { + continue; + } $break = $this->processRuleAction($ruleAction, $transaction); if (true === $break) { break; diff --git a/config/firefly.php b/config/firefly.php index aabb7779fe..5f3a13957f 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -168,7 +168,7 @@ return [ // 'lt_LT' => ['name_locale' => 'Lietuvių', 'name_english' => 'Lithuanian'], 'nb_NO' => ['name_locale' => 'Norsk', 'name_english' => 'Norwegian'], 'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch'], - 'pl_PL' => ['name_locale' => 'Polski', 'name_english' => 'Polish '], + 'pl_PL' => ['name_locale' => 'Polski', 'name_english' => 'Polish'], 'pt_BR' => ['name_locale' => 'Português do Brasil', 'name_english' => 'Portuguese (Brazil)'], 'pt_PT' => ['name_locale' => 'Português', 'name_english' => 'Portuguese'], 'ro_RO' => ['name_locale' => 'Română', 'name_english' => 'Romanian'],