mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Small code cleanup.
This commit is contained in:
@@ -121,7 +121,7 @@ class UpdateRequest extends FormRequest
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(array_key_exists('moment', $repetition)) {
|
if(array_key_exists('moment', $repetition)) {
|
||||||
$current['moment'] = $repetition['moment'];
|
$current['moment'] = (string)$repetition['moment'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(array_key_exists('skip', $repetition)) {
|
if(array_key_exists('skip', $repetition)) {
|
||||||
@@ -195,9 +195,9 @@ class UpdateRequest extends FormRequest
|
|||||||
{
|
{
|
||||||
$validator->after(
|
$validator->after(
|
||||||
function (Validator $validator) {
|
function (Validator $validator) {
|
||||||
//$this->validateOneRecurrenceTransaction($validator);
|
$this->validateOneRecurrenceTransaction($validator);
|
||||||
//$this->validateOneRepetitionUpdate($validator);
|
$this->validateOneRepetitionUpdate($validator);
|
||||||
//$this->validateRecurrenceRepetition($validator);
|
$this->validateRecurrenceRepetition($validator);
|
||||||
$this->validateRepetitionMoment($validator);
|
$this->validateRepetitionMoment($validator);
|
||||||
$this->validateForeignCurrencyInformation($validator);
|
$this->validateForeignCurrencyInformation($validator);
|
||||||
$this->valUpdateAccountInfo($validator);
|
$this->valUpdateAccountInfo($validator);
|
||||||
|
@@ -100,6 +100,8 @@ class RecurrenceUpdateService
|
|||||||
// update each repetition or throw error yay
|
// update each repetition or throw error yay
|
||||||
$this->updateRepetitions($recurrence, $data['repetitions'] ?? []);
|
$this->updateRepetitions($recurrence, $data['repetitions'] ?? []);
|
||||||
}
|
}
|
||||||
|
// update all transactions:
|
||||||
|
|
||||||
|
|
||||||
// // update all transactions (and associated meta-data)
|
// // update all transactions (and associated meta-data)
|
||||||
// if (array_key_exists('transactions', $data)) {
|
// if (array_key_exists('transactions', $data)) {
|
||||||
@@ -169,7 +171,8 @@ class RecurrenceUpdateService
|
|||||||
'type' => 'repetition_type',
|
'type' => 'repetition_type',
|
||||||
'moment' => 'repetition_moment',
|
'moment' => 'repetition_moment',
|
||||||
'skip' => 'repetition_skip',
|
'skip' => 'repetition_skip',
|
||||||
'weekend' => 'weekend',];
|
'weekend' => 'weekend',
|
||||||
|
];
|
||||||
foreach ($fields as $field => $column) {
|
foreach ($fields as $field => $column) {
|
||||||
if (array_key_exists($field, $current)) {
|
if (array_key_exists($field, $current)) {
|
||||||
$match->$column = $current[$field];
|
$match->$column = $current[$field];
|
||||||
|
Reference in New Issue
Block a user