Resolve "Set vehicle and customer id in warranty when JO is fulfilled" #1515

Merged
korina.cordero merged 4 commits from 588-set-vehicle-and-customer-id-in-warranty-when-jo-is-fulfilled into master-fix 2021-06-18 08:30:25 +00:00
Showing only changes of commit ceb54afa10 - Show all commits

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