From 6d979a68f20b1ee5df740c0809322539a516c768 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 2 Apr 2021 16:31:24 +0200 Subject: [PATCH] Fix missing first_date --- app/Http/Controllers/Recurring/EditController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.php index 7a3326c44a..765120fb10 100644 --- a/app/Http/Controllers/Recurring/EditController.php +++ b/app/Http/Controllers/Recurring/EditController.php @@ -132,15 +132,15 @@ class EditController extends Controller RecurrenceRepetition::WEEKEND_TO_MONDAY => (string)trans('firefly.jump_to_monday'), ]; - $hasOldInput = null !== $request->old('_token'); - $preFilled = [ + $hasOldInput = null !== $request->old('_token'); + $preFilled = [ 'transaction_type' => strtolower($recurrence->transactionType->type), 'active' => $hasOldInput ? (bool)$request->old('active') : $recurrence->active, 'apply_rules' => $hasOldInput ? (bool)$request->old('apply_rules') : $recurrence->apply_rules, 'deposit_source_id' => $array['transactions'][0]['source_id'], 'withdrawal_destination_id' => $array['transactions'][0]['destination_id'], ]; - + $array['first_date'] = substr($array['first_date'], 0, 10); $array['transactions'][0]['tags'] = implode(',', $array['transactions'][0]['tags'] ?? []); return prefixView(