Merge branch 'develop' into 5.8-dev

This commit is contained in:
James Cole
2022-10-01 19:06:55 +02:00
25 changed files with 367 additions and 122 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* InviteUserFormRequest.php
* Copyright (c) 2022 james@firefly-iii.org

View File

@@ -99,7 +99,7 @@ class RecurrenceFormRequest extends FormRequest
];
// fill in foreign currency data
if (null !== $this->float('foreign_amount')) {
if (null !== $this->convertFloat('foreign_amount')) {
$return['transactions'][0]['foreign_amount'] = $this->convertString('foreign_amount');
$return['transactions'][0]['foreign_currency_id'] = $this->convertInteger('foreign_currency_id');
}
@@ -228,7 +228,7 @@ class RecurrenceFormRequest extends FormRequest
$rules['repetitions'] = 'required|numeric|between:0,254';
}
// if foreign amount, currency must be different.
if (null !== $this->float('foreign_amount')) {
if (null !== $this->convertFloat('foreign_amount')) {
$rules['foreign_currency_id'] = 'exists:transaction_currencies,id|different:transaction_currency_id';
}