diff --git a/src/Command/UpdateCustomerVehicleWarrantyCommand.php b/src/Command/UpdateCustomerVehicleWarrantyCommand.php index 4449b54a..c771044f 100644 --- a/src/Command/UpdateCustomerVehicleWarrantyCommand.php +++ b/src/Command/UpdateCustomerVehicleWarrantyCommand.php @@ -64,6 +64,7 @@ class UpdateCustomerVehicleWarrantyCommand extends Command $batteries = $this->wh->getBatteriesForWarranty($warr); // find customer vehicle using plate number + /* error_log('Finding customer vehicle with plate number ' . $plate_number); $cust_vehicles = $this->em->getRepository(CustomerVehicle::class)->findBy(['plate_number' => $plate_number]); @@ -88,7 +89,9 @@ class UpdateCustomerVehicleWarrantyCommand extends Command 'plate_number' => $plate_number]); $q->execute(); - } + } */ + $this->wh->updateCustomerVehicle($serial, $batteries, $plate_number, $expiry_date); + $this->em->clear(); } } diff --git a/src/Service/WarrantyHandler.php b/src/Service/WarrantyHandler.php index 4d4b4b62..c63f0302 100644 --- a/src/Service/WarrantyHandler.php +++ b/src/Service/WarrantyHandler.php @@ -92,7 +92,7 @@ class WarrantyHandler public function updateCustomerVehicle($serial, $batteries, $plate_number, $date_expire) { // find customer vehicle using plate number - // error_log('Finding customer vehicle with plate number ' . $plate_number); + error_log('Finding customer vehicle with plate number ' . $plate_number); $cust_vehicles = $this->em->getRepository(CustomerVehicle::class)->findBy(['plate_number' => $plate_number]); $battery_id = null; if (!empty($cust_vehicles))