From ae60cd5b28ca78c8d8c9529af0bede0dc9a7c894 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 3 Nov 2024 19:42:48 +0100 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/9294 --- app/Http/Controllers/Recurring/ShowController.php | 9 +++++++++ resources/lang/en_US/firefly.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Recurring/ShowController.php b/app/Http/Controllers/Recurring/ShowController.php index 5609c0f072..0fbc9155e7 100644 --- a/app/Http/Controllers/Recurring/ShowController.php +++ b/app/Http/Controllers/Recurring/ShowController.php @@ -115,6 +115,15 @@ class ShowController extends Controller $array['attachments'][] = $item; } + if(null !== $array['nr_of_repetitions']) { + $left = $array['nr_of_repetitions'] - $array['journal_count']; + $left = max(0, $left); + // limit each repetition to X occurrences: + foreach($array['repetitions'] as $index => $repetition) { + $array['repetitions'][$index]['occurrences'] = array_slice($repetition['occurrences'], 0, $left); + } + } + $subTitle = (string)trans('firefly.overview_for_recurrence', ['title' => $recurrence->title]); return view('recurring.show', compact('recurrence', 'subTitle', 'array', 'groups', 'today')); diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index dbe1e238f8..7cf8cd83df 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -755,7 +755,7 @@ return [ 'instructions_rule_from_journal' => 'Create a rule based on one of your transactions. Complement or submit the form below.', 'rule_is_strict' => 'strict rule', 'rule_is_not_strict' => 'non-strict rule', - 'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.', + 'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed if this particular rule is executed.', 'rule_help_strict' => 'In strict rules ALL triggers must fire for the action(s) to be executed. In non-strict rules, ANY trigger is enough for the action(s) to be executed.', 'rule_help_active' => 'Inactive rules will never fire.', 'stored_new_rule' => 'Stored new rule with title ":title"',