Fixed search for customer vehicle. #588

This commit is contained in:
Korina Cordero 2021-06-18 08:15:33 +00:00
parent 4a0adef749
commit ceb54afa10

View file

@ -3276,7 +3276,7 @@ class APIController extends Controller implements LoggedController
if ($clean_plate)
{
// find the customer vehicle and get the vehicle
$cv = $em->getRepository(CustomerVehicle::class)->findOneBy(['plate_number' => $clean_plate]);
$cv = $em->getRepository(CustomerVehicle::class)->findOneBy(['plate_number' => $clean_plate, 'customer' => $customer]);
if ($cv != null)
{
// confirm that customer vehicle found does belong to customer