Merge branch '318-error_log-cleanup' into 'master'
Resolve "error_log cleanup" Closes #318 See merge request jankstudio/resq!363
This commit is contained in:
commit
bfbe4ca95e
7 changed files with 9 additions and 15 deletions
|
|
@ -313,17 +313,14 @@ class CreateCustomerFromWarrantyCommand extends Command
|
|||
|
||||
protected function loadCustomers()
|
||||
{
|
||||
error_log('starting query...');
|
||||
// get all customers
|
||||
$customers = $this->em->getRepository(Customer::class)->findAll();
|
||||
$cust_q = $this->em->createQuery('select c from App\Entity\Customer c');
|
||||
$cust_iter = $q->iterate();
|
||||
|
||||
error_log('looping through query...');
|
||||
$this->cust_index = [];
|
||||
foreach ($cust_iter as $customer)
|
||||
{
|
||||
error_log('here');
|
||||
$mobile = trim($customer->getPhoneMobile());
|
||||
if (!empty($mobile))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class HubController extends Controller
|
|||
{
|
||||
$this->denyAccessUnlessGranted('hub.add', null, 'No access.');
|
||||
|
||||
error_log($req->request->get('time_open'));
|
||||
//error_log($req->request->get('time_open'));
|
||||
|
||||
// create new object
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
|
|
|||
|
|
@ -148,7 +148,6 @@ class StaticContentController extends Controller
|
|||
$result = $em->getRepository(StaticContent::class)->find($id);
|
||||
if ($result != null)
|
||||
{
|
||||
error_log($id);
|
||||
$error_array['id'] = 'Duplicate ID exists.';
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +225,6 @@ class StaticContentController extends Controller
|
|||
$result = $em->getRepository(StaticContent::class)->find($id);
|
||||
if ($result != null)
|
||||
{
|
||||
error_log($id);
|
||||
$error_array['id'] = 'Duplicate ID exists.';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,6 @@ class VehicleController extends Controller
|
|||
|
||||
// get current batteries of vehicle to be updated
|
||||
$current_batteries = $row->getBatteries();
|
||||
error_log('count of current batteries ' . count($current_batteries));
|
||||
|
||||
// set and save values
|
||||
$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
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -582,7 +582,7 @@ class WarrantyController extends Controller
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ class InvoiceCreator
|
|||
$diesel_price = 220;
|
||||
|
||||
$fuel = new InvoiceItem();
|
||||
error_log('fuel type - ' . $ftype);
|
||||
//error_log('fuel type - ' . $ftype);
|
||||
switch ($ftype)
|
||||
{
|
||||
case FuelType::GAS:
|
||||
|
|
@ -443,7 +443,7 @@ class InvoiceCreator
|
|||
$this->processOverheat($total, $invoice, $cv, $has_coolant);
|
||||
break;
|
||||
case ServiceType::EMERGENCY_REFUEL:
|
||||
error_log('processing refuel');
|
||||
//error_log('processing refuel');
|
||||
$ftype = $criteria->getCustomerVehicle()->getFuelType();
|
||||
$this->processRefuel($total, $invoice, $cv);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,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);
|
||||
$cv_q = $this->em->createQuery('select count(cv) from App\Entity\CustomerVehicle cv where cv.plate_number = :plate_number')
|
||||
->setParameter('plate_number', $plate_number);
|
||||
$cv_result = $cv_q->getSingleScalarResult();
|
||||
|
|
@ -288,7 +288,7 @@ class WarrantyHandler
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -301,12 +301,12 @@ class WarrantyHandler
|
|||
{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue