Unrequire batt_id and trade_in for change service rider api call and add or_num #153
This commit is contained in:
parent
052f3dfe62
commit
584652d31d
1 changed files with 7 additions and 2 deletions
|
|
@ -668,7 +668,7 @@ class RAPIController extends Controller
|
||||||
{
|
{
|
||||||
// allow rider to change service, promo, battery and trade-in options
|
// allow rider to change service, promo, battery and trade-in options
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$required_params = ['jo_id', 'stype_id', 'promo_id', 'batt_id', 'trade_in'];
|
$required_params = ['jo_id', 'stype_id', 'promo_id'];
|
||||||
$res = $this->checkJO($req, $required_params, $jo);
|
$res = $this->checkJO($req, $required_params, $jo);
|
||||||
if ($res->isError())
|
if ($res->isError())
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
|
|
@ -698,10 +698,15 @@ class RAPIController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check or number
|
||||||
|
$or_num = $req->request->get('or_num');
|
||||||
|
if ($or_num != null)
|
||||||
|
$jo->setORNum($or_num);
|
||||||
|
|
||||||
// check battery id
|
// check battery id
|
||||||
$batt_id = $req->request->get('batt_id');
|
$batt_id = $req->request->get('batt_id');
|
||||||
// no battery
|
// no battery
|
||||||
if ($batt_id == 0)
|
if ($batt_id == 0 || $batt_id == null)
|
||||||
$battery = null;
|
$battery = null;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue