diff --git a/app/Http/Requests/BillFormRequest.php b/app/Http/Requests/BillFormRequest.php index 8780a4bc4f..25066ad7a1 100644 --- a/app/Http/Requests/BillFormRequest.php +++ b/app/Http/Requests/BillFormRequest.php @@ -48,15 +48,15 @@ class BillFormRequest extends Request public function getBillData(): array { return [ - 'name' => $this->string('name'), - 'amount_min' => $this->string('amount_min'), - 'transaction_currency_id' => $this->integer('transaction_currency_id'), - 'amount_max' => $this->string('amount_max'), - 'date' => $this->date('date'), - 'repeat_freq' => $this->string('repeat_freq'), - 'skip' => $this->integer('skip'), - 'notes' => $this->string('notes'), - 'active' => $this->boolean('active'), + 'name' => $this->string('name'), + 'amount_min' => $this->string('amount_min'), + 'currency_id' => $this->integer('transaction_currency_id'), + 'amount_max' => $this->string('amount_max'), + 'date' => $this->date('date'), + 'repeat_freq' => $this->string('repeat_freq'), + 'skip' => $this->integer('skip'), + 'notes' => $this->string('notes'), + 'active' => $this->boolean('active'), ]; } diff --git a/app/Services/Internal/Update/BillUpdateService.php b/app/Services/Internal/Update/BillUpdateService.php index 1c849d4fb4..0450e6e90c 100644 --- a/app/Services/Internal/Update/BillUpdateService.php +++ b/app/Services/Internal/Update/BillUpdateService.php @@ -47,7 +47,7 @@ class BillUpdateService $bill->amount_min = $data['amount_min']; $bill->amount_max = $data['amount_max']; $bill->date = $data['date']; - $bill->transaction_currency_id = $data['transaction_currency_id']; + $bill->transaction_currency_id = $data['currency_id']; $bill->repeat_freq = $data['repeat_freq']; $bill->skip = $data['skip']; $bill->automatch = true; @@ -55,7 +55,7 @@ class BillUpdateService $bill->save(); // update note: - if (isset($data['notes']) && null !== $data['notes']) { + if (isset($data['notes'])) { $this->updateNote($bill, (string)$data['notes']); }