Move updating of customer vehicle out of the command and into the warranty service. #290
This commit is contained in:
parent
10d9e6e5ae
commit
eea64645b5
2 changed files with 5 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue