mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Last steps for import, in user interface.
This commit is contained in:
@@ -256,7 +256,7 @@ class CsvProcessor implements FileProcessorInterface
|
||||
* @var string $value
|
||||
*/
|
||||
foreach ($row as $rowIndex => $value) {
|
||||
$value = trim($value);
|
||||
$value = trim(strval($value));
|
||||
if (strlen($value) > 0) {
|
||||
$annotated = $this->annotateValue($rowIndex, $value);
|
||||
Log::debug('Annotated value', $annotated);
|
||||
|
@@ -109,9 +109,11 @@ class FileRoutine implements RoutineInterface
|
||||
*/
|
||||
protected function getImportObjects(): Collection
|
||||
{
|
||||
$objects = new Collection;
|
||||
$type = $this->job->file_type;
|
||||
$class = config(sprintf('firefly.import_processors.%s', $type));
|
||||
$objects = new Collection;
|
||||
$config = $this->job->configuration;
|
||||
$fileType = $config['file-type'];
|
||||
// will only respond to "file"
|
||||
$class = config(sprintf('import.options.file.processors.%s', $fileType));
|
||||
/** @var FileProcessorInterface $processor */
|
||||
$processor = app($class);
|
||||
$processor->setJob($this->job);
|
||||
@@ -146,7 +148,7 @@ class FileRoutine implements RoutineInterface
|
||||
$repository = app(TagRepositoryInterface::class);
|
||||
$repository->setUser($this->job->user);
|
||||
$data = [
|
||||
'tag' => trans('firefly.import_with_key', ['key' => $this->job->key]),
|
||||
'tag' => trans('import.import_with_key', ['key' => $this->job->key]),
|
||||
'date' => new Carbon,
|
||||
'description' => null,
|
||||
'latitude' => null,
|
||||
|
Reference in New Issue
Block a user