Resolve "Vehicle migration manual fixes" #871

Merged
jankstudio merged 3 commits from 73-vehicle-migration-manual-fixes into master 2018-04-05 19:42:38 +00:00
Showing only changes of commit 36ac62a2ad - Show all commits

View file

@ -92,20 +92,21 @@ class ImportCustomerCommand extends Command
{
// search for manufacturer
$mfg_name = trim($row[self::F_V_BRAND]);
$make = strtoupper(trim($row[self::F_V_MAKE]));
$model = trim($row[self::F_V_MODEL]);
if (!isset($this->mfg_index[$mfg_name]))
{
$output->writeln('manufacturer not found: ' . $mfg_name);
$output->writeln('manufacturer not found: ' . $mfg_name . ' - ' . $make . ' - ' . $model);
return null;
}
$mfg = $this->mfg_index[$mfg_name];
// check if empty make
$make = strtoupper(trim($row[self::F_V_MAKE]));
if (empty($make))
return null;
// get year from and to from model
$model = trim($row[self::F_V_MODEL]);
if (empty($model))
$model = 'NONE';