mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This fixes #419
This commit is contained in:
parent
f029f7607b
commit
7ebb68e36c
@ -160,6 +160,7 @@ class JournalFormRequest extends Request
|
||||
*/
|
||||
private function getFieldOrEmptyString(string $field): string
|
||||
{
|
||||
return $this->get($field) ?? '';
|
||||
$tring = $this->get($field) ?? ''
|
||||
return trim($string);
|
||||
}
|
||||
}
|
||||
|
@ -90,11 +90,12 @@ class SplitJournalFormRequest extends Request
|
||||
$return = [];
|
||||
// description is leading because it is one of the mandatory fields.
|
||||
foreach ($this->get('description') as $index => $description) {
|
||||
$category = $this->get('category')[$index] ?? '';
|
||||
$transaction = [
|
||||
'description' => $description,
|
||||
'amount' => round($this->get('amount')[$index], 2),
|
||||
'budget_id' => $this->get('budget_id')[$index] ? intval($this->get('budget_id')[$index]) : 0,
|
||||
'category' => $this->get('category')[$index] ?? '',
|
||||
'category' => trim($category),
|
||||
'source_account_id' => isset($this->get('source_account_id')[$index])
|
||||
? intval($this->get('source_account_id')[$index])
|
||||
: intval(
|
||||
|
Loading…
Reference in New Issue
Block a user