mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
🤖 Auto commit for release 'develop' on 2025-04-20
This commit is contained in:
@@ -78,14 +78,14 @@ class EditController extends Controller
|
||||
$startDate = $piggyBank->start_date?->format('Y-m-d');
|
||||
|
||||
$preFilled = [
|
||||
'name' => $piggyBank->name,
|
||||
'name' => $piggyBank->name,
|
||||
'transaction_currency_id' => (int) $piggyBank->transaction_currency_id,
|
||||
'target_amount' => app('steam')->bcround($piggyBank->target_amount, $piggyBank->transactionCurrency->decimal_places),
|
||||
'target_date' => $targetDate,
|
||||
'start_date' => $startDate,
|
||||
'accounts' => [],
|
||||
'object_group' => null !== $piggyBank->objectGroups->first() ? $piggyBank->objectGroups->first()->title : '',
|
||||
'notes' => null === $note ? '' : $note->text,
|
||||
'target_amount' => app('steam')->bcround($piggyBank->target_amount, $piggyBank->transactionCurrency->decimal_places),
|
||||
'target_date' => $targetDate,
|
||||
'start_date' => $startDate,
|
||||
'accounts' => [],
|
||||
'object_group' => null !== $piggyBank->objectGroups->first() ? $piggyBank->objectGroups->first()->title : '',
|
||||
'notes' => null === $note ? '' : $note->text,
|
||||
];
|
||||
foreach ($piggyBank->accounts as $account) {
|
||||
$preFilled['accounts'][] = $account->id;
|
||||
|
||||
@@ -32,12 +32,12 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
// After...
|
||||
protected $headers = Request::HEADER_X_FORWARDED_FOR |
|
||||
Request::HEADER_X_FORWARDED_HOST |
|
||||
Request::HEADER_X_FORWARDED_PORT |
|
||||
Request::HEADER_X_FORWARDED_PROTO |
|
||||
Request::HEADER_X_FORWARDED_PREFIX |
|
||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
protected $headers = Request::HEADER_X_FORWARDED_FOR
|
||||
| Request::HEADER_X_FORWARDED_HOST
|
||||
| Request::HEADER_X_FORWARDED_PORT
|
||||
| Request::HEADER_X_FORWARDED_PROTO
|
||||
| Request::HEADER_X_FORWARDED_PREFIX
|
||||
| Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
|
||||
/**
|
||||
* TrustProxies constructor.
|
||||
|
||||
@@ -49,13 +49,13 @@ class PiggyBankUpdateRequest extends FormRequest
|
||||
{
|
||||
$accounts = $this->get('accounts');
|
||||
$data = [
|
||||
'name' => $this->convertString('name'),
|
||||
'start_date' => $this->getCarbonDate('start_date'),
|
||||
'target_amount' => trim($this->convertString('target_amount')),
|
||||
'target_date' => $this->getCarbonDate('target_date'),
|
||||
'name' => $this->convertString('name'),
|
||||
'start_date' => $this->getCarbonDate('start_date'),
|
||||
'target_amount' => trim($this->convertString('target_amount')),
|
||||
'target_date' => $this->getCarbonDate('target_date'),
|
||||
'transaction_currency_id' => $this->convertInteger('transaction_currency_id'),
|
||||
'notes' => $this->stringWithNewlines('notes'),
|
||||
'object_group_title' => $this->convertString('object_group'),
|
||||
'notes' => $this->stringWithNewlines('notes'),
|
||||
'object_group_title' => $this->convertString('object_group'),
|
||||
];
|
||||
if (!is_array($accounts)) {
|
||||
$accounts = [];
|
||||
@@ -110,7 +110,7 @@ class PiggyBankUpdateRequest extends FormRequest
|
||||
if ($accountCurrency->id !== $currency->id && 'true' !== $isMultiCurrency) {
|
||||
$validator->errors()->add('accounts', trans('validation.invalid_account_currency'));
|
||||
}
|
||||
$type = $account->accountType->type;
|
||||
$type = $account->accountType->type;
|
||||
if (!in_array($type, $types, true)) {
|
||||
$validator->errors()->add('accounts', trans('validation.invalid_account_type'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user