Modify name of stype_id parameter to service_type for clarity. #421
This commit is contained in:
parent
760fa7acf3
commit
8f108c18cb
1 changed files with 6 additions and 6 deletions
|
|
@ -978,17 +978,17 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
$this->debugRequest($req);
|
$this->debugRequest($req);
|
||||||
|
|
||||||
// allow rider to change service, promo, battery and trade-in options
|
// allow rider to change service, promo, battery and trade-in options
|
||||||
$required_params = ['jo_id', 'stype_id', 'promo_id'];
|
$required_params = ['jo_id', 'service_type', 'promo_id'];
|
||||||
$data = $this->checkJO($req, $required_params, $jo);
|
$data = $this->checkJO($req, $required_params, $jo);
|
||||||
if (isset($data['error']))
|
if (isset($data['error']))
|
||||||
return $data;
|
return $data;
|
||||||
|
|
||||||
// check service type
|
// check service type
|
||||||
$stype_id = $req->request->get('stype_id');
|
$service_type = $req->request->get('service_type');
|
||||||
if (!ServiceType::validate($stype_id))
|
if (!ServiceType::validate($service_type))
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'error' => 'Invalid service type - ' . $stype_id
|
'error' => 'Invalid service type - ' . $service_type
|
||||||
];
|
];
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
@ -1061,7 +1061,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
|
|
||||||
// generate new invoice
|
// generate new invoice
|
||||||
$crit = new InvoiceCriteria();
|
$crit = new InvoiceCriteria();
|
||||||
$crit->setServiceType($stype_id);
|
$crit->setServiceType($service_type);
|
||||||
$crit->setCustomerVehicle($cv);
|
$crit->setCustomerVehicle($cv);
|
||||||
$crit->setHasCoolant($jo->hasCoolant());
|
$crit->setHasCoolant($jo->hasCoolant());
|
||||||
|
|
||||||
|
|
@ -1082,7 +1082,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
// save job order
|
// save job order
|
||||||
$jo->setServiceType($stype_id);
|
$jo->setServiceType($service_type);
|
||||||
|
|
||||||
// save invoice
|
// save invoice
|
||||||
$jo->setInvoice($invoice);
|
$jo->setInvoice($invoice);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue