From 36ac62a2adae64ed161201e808f7a2eef1605247 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Fri, 6 Apr 2018 00:25:19 +0800 Subject: [PATCH] Add better debugging messages when vehicle has no match in db #73 --- src/Command/ImportCustomerCommand.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Command/ImportCustomerCommand.php b/src/Command/ImportCustomerCommand.php index fe9c1455..29d16409 100644 --- a/src/Command/ImportCustomerCommand.php +++ b/src/Command/ImportCustomerCommand.php @@ -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';