mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Fixed #3737
This commit is contained in:
@@ -143,6 +143,12 @@ class CreateController extends Controller
|
|||||||
$oldTriggers = $this->getTriggersForBill($bill);
|
$oldTriggers = $this->getTriggersForBill($bill);
|
||||||
$oldActions = $this->getActionsForBill($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);
|
$triggerCount = count($oldTriggers);
|
||||||
$actionCount = count($oldActions);
|
$actionCount = count($oldActions);
|
||||||
$subTitleIcon = 'fa-clone';
|
$subTitleIcon = 'fa-clone';
|
||||||
@@ -179,8 +185,6 @@ class CreateController extends Controller
|
|||||||
// get triggers and actions for journal.
|
// get triggers and actions for journal.
|
||||||
$oldTriggers = $this->getTriggersForJournal($journal);
|
$oldTriggers = $this->getTriggersForJournal($journal);
|
||||||
$oldActions = [];
|
$oldActions = [];
|
||||||
$triggerCount = count($oldTriggers);
|
|
||||||
$actionCount = count($oldActions);
|
|
||||||
|
|
||||||
$this->createDefaultRuleGroup();
|
$this->createDefaultRuleGroup();
|
||||||
$this->createDefaultRule();
|
$this->createDefaultRule();
|
||||||
@@ -192,6 +196,15 @@ class CreateController extends Controller
|
|||||||
'description' => (string) trans('firefly.new_rule_for_journal_description', ['description' => $journal->description]),
|
'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
|
// flash old data
|
||||||
$request->session()->flash('preFilled', $preFilled);
|
$request->session()->flash('preFilled', $preFilled);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user