mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 19:01:39 +00:00
Code cleanup
This commit is contained in:
@@ -41,12 +41,12 @@ class PiggyBankStoreRequest extends FormRequest
|
||||
public function getPiggyBankData(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->string('name'),
|
||||
'startdate' => $this->date('startdate'),
|
||||
'account_id' => $this->integer('account_id'),
|
||||
'targetamount' => $this->string('targetamount'),
|
||||
'targetdate' => $this->date('targetdate'),
|
||||
'notes' => $this->nlString('notes'),
|
||||
'name' => $this->string('name'),
|
||||
'startdate' => $this->date('startdate'),
|
||||
'account_id' => $this->integer('account_id'),
|
||||
'targetamount' => $this->string('targetamount'),
|
||||
'targetdate' => $this->date('targetdate'),
|
||||
'notes' => $this->nlString('notes'),
|
||||
'object_group_title' => $this->string('object_group'),
|
||||
];
|
||||
}
|
||||
|
@@ -127,11 +127,11 @@ class RecurrenceFormRequest extends FormRequest
|
||||
// replace category name with a new category:
|
||||
$factory = app(CategoryFactory::class);
|
||||
$factory->setUser(auth()->user());
|
||||
foreach($return['transactions'] as $index => $transaction) {
|
||||
$categoryName =$transaction['category_name'] ??null;
|
||||
if(null !== $categoryName) {
|
||||
foreach ($return['transactions'] as $index => $transaction) {
|
||||
$categoryName = $transaction['category_name'] ?? null;
|
||||
if (null !== $categoryName) {
|
||||
$category = $factory->findOrCreate(null, $categoryName);
|
||||
if(null !== $category) {
|
||||
if (null !== $category) {
|
||||
$return['transactions'][$index]['category_id'] = $category->id;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user