🤖 Auto commit for release 'develop' on 2025-04-20

This commit is contained in:
JC5
2025-04-20 21:12:34 +02:00
parent 2d41db349a
commit b1dbd3ee17
8 changed files with 82 additions and 86 deletions

View File

@@ -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;

View File

@@ -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.

View File

@@ -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'));
}