Modify query for customer vehicle to get only one customer vehicle. #255
This commit is contained in:
parent
15f2764ae8
commit
b4c8b83742
1 changed files with 4 additions and 3 deletions
|
|
@ -510,7 +510,8 @@ class ReportController extends Controller
|
|||
while(($fields = fgetcsv($fh)) !== false)
|
||||
{
|
||||
$has_warranty = false;
|
||||
if ($row_num <= 2)
|
||||
//error_log($row_num . ' ' . trim($fields[2]));
|
||||
if ($row_num < 1)
|
||||
{
|
||||
$row_num++;
|
||||
continue;
|
||||
|
|
@ -535,8 +536,8 @@ class ReportController extends Controller
|
|||
{
|
||||
// get customer vehicle using plate number
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$cust_vehicles = $em->getRepository(CustomerVehicle::class)->findBy(['plate_number' => $warranty->getPlateNumber()]);
|
||||
foreach ($cust_vehicles as $cv)
|
||||
$cv = $em->getRepository(CustomerVehicle::class)->findOneBy(['plate_number' => $warranty->getPlateNumber()]);
|
||||
if ($cv != null)
|
||||
{
|
||||
// get customer info
|
||||
// get mobile session of customer
|
||||
|
|
|
|||
Loading…
Reference in a new issue