Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Only fire post-processing specifix in the import routine. See issue #145
James Coled211555beb45
diff --git a/app/Helpers/Csv/Importer.php b/app/Helpers/Csv/Importer.phpindex 2aa4274b26..8f139d8bc8 100644--- a/app/Helpers/Csv/Importer.php+++ b/app/Helpers/Csv/Importer.php@@ -246,6 +246,8 @@ class ImporterLog::debug('Column #' . $index . ' (role: ' . $role . ') : converter ' . $class . ' stores its data into field ' . $field . ':');+ // here would be the place where preprocessors would fire.+/** @var ConverterInterface $converter */$converter = app('FireflyIII\Helpers\Csv\Converter\\' . $class);$converter->setData($data); // the complete array so far.@@ -294,10 +296,12 @@ class Importerforeach ($this->getSpecifix() as $className) {/** @var SpecifixInterface $specifix */$specifix = app('FireflyIII\Helpers\Csv\Specifix\\' . $className);- $specifix->setData($this->importData);- $specifix->setRow($this->importRow);- Log::debug('Now post-process specifix named ' . $className . ':');- $this->importData = $specifix->fix();+ if ($specifix->getProcessorType() == SpecifixInterface::POST_PROCESSOR) {+ $specifix->setData($this->importData);+ $specifix->setRow($this->importRow);+ Log::debug('Now post-process specifix named ' . $className . ':');+ $this->importData = $specifix->fix();+ }}