Remove or comment out error_logs meant for debugging purposes. #318
This commit is contained in:
parent
15ec71d3d0
commit
dab8986ad1
7 changed files with 9 additions and 15 deletions
|
|
@ -313,17 +313,14 @@ class CreateCustomerFromWarrantyCommand extends Command
|
||||||
|
|
||||||
protected function loadCustomers()
|
protected function loadCustomers()
|
||||||
{
|
{
|
||||||
error_log('starting query...');
|
|
||||||
// get all customers
|
// get all customers
|
||||||
$customers = $this->em->getRepository(Customer::class)->findAll();
|
$customers = $this->em->getRepository(Customer::class)->findAll();
|
||||||
$cust_q = $this->em->createQuery('select c from App\Entity\Customer c');
|
$cust_q = $this->em->createQuery('select c from App\Entity\Customer c');
|
||||||
$cust_iter = $q->iterate();
|
$cust_iter = $q->iterate();
|
||||||
|
|
||||||
error_log('looping through query...');
|
|
||||||
$this->cust_index = [];
|
$this->cust_index = [];
|
||||||
foreach ($cust_iter as $customer)
|
foreach ($cust_iter as $customer)
|
||||||
{
|
{
|
||||||
error_log('here');
|
|
||||||
$mobile = trim($customer->getPhoneMobile());
|
$mobile = trim($customer->getPhoneMobile());
|
||||||
if (!empty($mobile))
|
if (!empty($mobile))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ class HubController extends Controller
|
||||||
{
|
{
|
||||||
$this->denyAccessUnlessGranted('hub.add', null, 'No access.');
|
$this->denyAccessUnlessGranted('hub.add', null, 'No access.');
|
||||||
|
|
||||||
error_log($req->request->get('time_open'));
|
//error_log($req->request->get('time_open'));
|
||||||
|
|
||||||
// create new object
|
// create new object
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,6 @@ class StaticContentController extends Controller
|
||||||
$result = $em->getRepository(StaticContent::class)->find($id);
|
$result = $em->getRepository(StaticContent::class)->find($id);
|
||||||
if ($result != null)
|
if ($result != null)
|
||||||
{
|
{
|
||||||
error_log($id);
|
|
||||||
$error_array['id'] = 'Duplicate ID exists.';
|
$error_array['id'] = 'Duplicate ID exists.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -226,7 +225,6 @@ class StaticContentController extends Controller
|
||||||
$result = $em->getRepository(StaticContent::class)->find($id);
|
$result = $em->getRepository(StaticContent::class)->find($id);
|
||||||
if ($result != null)
|
if ($result != null)
|
||||||
{
|
{
|
||||||
error_log($id);
|
|
||||||
$error_array['id'] = 'Duplicate ID exists.';
|
$error_array['id'] = 'Duplicate ID exists.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,6 @@ class VehicleController extends Controller
|
||||||
|
|
||||||
// get current batteries of vehicle to be updated
|
// get current batteries of vehicle to be updated
|
||||||
$current_batteries = $row->getBatteries();
|
$current_batteries = $row->getBatteries();
|
||||||
error_log('count of current batteries ' . count($current_batteries));
|
|
||||||
|
|
||||||
// set and save values
|
// set and save values
|
||||||
$row->setMake($req->request->get('make'))
|
$row->setMake($req->request->get('make'))
|
||||||
|
|
|
||||||
|
|
@ -567,7 +567,7 @@ class WarrantyController extends Controller
|
||||||
{
|
{
|
||||||
// call service to check if warranty details is incomplete and then update warranty
|
// call service to check if warranty details is incomplete and then update warranty
|
||||||
// using details from csv file
|
// using details from csv file
|
||||||
error_log('Updating warranty for ' . $warr->getID());
|
// error_log('Updating warranty for ' . $warr->getID());
|
||||||
$wh->updateWarranty($warr, $first_name, $last_name, $mobile_number, $batt_list, $date_purchase);
|
$wh->updateWarranty($warr, $first_name, $last_name, $mobile_number, $batt_list, $date_purchase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -582,7 +582,7 @@ class WarrantyController extends Controller
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_log('Creating warranty for serial ' . $serial . ' and plate number ' . $plate_number);
|
// error_log('Creating warranty for serial ' . $serial . ' and plate number ' . $plate_number);
|
||||||
|
|
||||||
$wh->createWarranty($serial, $plate_number, $first_name, $last_name, $mobile_number, $batt_list, $date_purchase, $warranty_class);
|
$wh->createWarranty($serial, $plate_number, $first_name, $last_name, $mobile_number, $batt_list, $date_purchase, $warranty_class);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ class InvoiceCreator
|
||||||
$diesel_price = 220;
|
$diesel_price = 220;
|
||||||
|
|
||||||
$fuel = new InvoiceItem();
|
$fuel = new InvoiceItem();
|
||||||
error_log('fuel type - ' . $ftype);
|
//error_log('fuel type - ' . $ftype);
|
||||||
switch ($ftype)
|
switch ($ftype)
|
||||||
{
|
{
|
||||||
case FuelType::GAS:
|
case FuelType::GAS:
|
||||||
|
|
@ -443,7 +443,7 @@ class InvoiceCreator
|
||||||
$this->processOverheat($total, $invoice, $cv, $has_coolant);
|
$this->processOverheat($total, $invoice, $cv, $has_coolant);
|
||||||
break;
|
break;
|
||||||
case ServiceType::EMERGENCY_REFUEL:
|
case ServiceType::EMERGENCY_REFUEL:
|
||||||
error_log('processing refuel');
|
//error_log('processing refuel');
|
||||||
$ftype = $criteria->getCustomerVehicle()->getFuelType();
|
$ftype = $criteria->getCustomerVehicle()->getFuelType();
|
||||||
$this->processRefuel($total, $invoice, $cv);
|
$this->processRefuel($total, $invoice, $cv);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class WarrantyHandler
|
||||||
public function updateCustomerVehicle($serial, $batteries, $plate_number, $date_expire)
|
public function updateCustomerVehicle($serial, $batteries, $plate_number, $date_expire)
|
||||||
{
|
{
|
||||||
// find customer vehicle using plate number
|
// 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);
|
||||||
$cv_q = $this->em->createQuery('select count(cv) from App\Entity\CustomerVehicle cv where cv.plate_number = :plate_number')
|
$cv_q = $this->em->createQuery('select count(cv) from App\Entity\CustomerVehicle cv where cv.plate_number = :plate_number')
|
||||||
->setParameter('plate_number', $plate_number);
|
->setParameter('plate_number', $plate_number);
|
||||||
$cv_result = $cv_q->getSingleScalarResult();
|
$cv_result = $cv_q->getSingleScalarResult();
|
||||||
|
|
@ -288,7 +288,7 @@ class WarrantyHandler
|
||||||
|
|
||||||
if (empty($warranty_class))
|
if (empty($warranty_class))
|
||||||
{
|
{
|
||||||
error_log('Warranty class is empty for warranty id ' . $warr->getID());
|
//error_log('Warranty class is empty for warranty id ' . $warr->getID());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -301,12 +301,12 @@ class WarrantyHandler
|
||||||
{
|
{
|
||||||
if ($batt_model == null)
|
if ($batt_model == null)
|
||||||
{
|
{
|
||||||
error_log('Battery model is null for warranty id ' . $warr->getID());
|
//error_log('Battery model is null for warranty id ' . $warr->getID());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ($batt_size == null)
|
if ($batt_size == null)
|
||||||
{
|
{
|
||||||
error_log('Battery size is null for warranty id ' . $warr->getID());
|
//error_log('Battery size is null for warranty id ' . $warr->getID());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue