improved request and balance range date handling

This commit is contained in:
Nicky De Maeyer
2025-10-07 14:32:23 +02:00
parent 98be3a1414
commit a1c870c962
10 changed files with 51 additions and 43 deletions

View File

@@ -48,10 +48,11 @@ class AutocompleteRequest extends FormRequest
// remove 'initial balance' from allowed types. its internal
$array = array_diff($array, [AccountTypeEnum::INITIAL_BALANCE->value, AccountTypeEnum::RECONCILIATION->value]);
$date = $this->getCarbonDate('date') ?? today(config('app.timezone'));
return [
'types' => $array,
'query' => $this->convertString('query'),
'date' => $this->getCarbonDate('date'),
'date' => $date->endOfDay(),
];
}