Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fixed #3737
James Colec985683ee3b0
diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.phpindex e7a50340fd..65926fd693 100644--- a/app/Http/Controllers/Rule/CreateController.php+++ b/app/Http/Controllers/Rule/CreateController.php@@ -143,6 +143,12 @@ class CreateController extends Controller$oldTriggers = $this->getTriggersForBill($bill);$oldActions = $this->getActionsForBill($bill);+ // restore actions and triggers from old input:+ if ($request->old()) {+ $oldTriggers = $this->getPreviousTriggers($request);+ $oldActions = $this->getPreviousActions($request);+ }+$triggerCount = count($oldTriggers);$actionCount = count($oldActions);$subTitleIcon = 'fa-clone';@@ -179,8 +185,6 @@ class CreateController extends Controller// get triggers and actions for journal.$oldTriggers = $this->getTriggersForJournal($journal);$oldActions = [];- $triggerCount = count($oldTriggers);- $actionCount = count($oldActions);$this->createDefaultRuleGroup();$this->createDefaultRule();@@ -192,6 +196,15 @@ class CreateController extends Controller'description' => (string) trans('firefly.new_rule_for_journal_description', ['description' => $journal->description]),];+ // restore actions and triggers from old input:+ if ($request->old()) {+ $oldTriggers = $this->getPreviousTriggers($request);+ $oldActions = $this->getPreviousActions($request);+ }++ $triggerCount = count($oldTriggers);+ $actionCount = count($oldActions);+// flash old data$request->session()->flash('preFilled', $preFilled);