Resolve "Rider app changes" #965
2 changed files with 27 additions and 2 deletions
|
|
@ -385,6 +385,8 @@ class RAPIController extends Controller
|
||||||
'plate_number' => $cv->getPlateNumber(),
|
'plate_number' => $cv->getPlateNumber(),
|
||||||
'color' => $cv->getColor(),
|
'color' => $cv->getColor(),
|
||||||
],
|
],
|
||||||
|
'or_num' => $jo->getORNum(),
|
||||||
|
'or_name' => $jo->getORName(),
|
||||||
'delivery_instructions' => $jo->getDeliveryInstructions(),
|
'delivery_instructions' => $jo->getDeliveryInstructions(),
|
||||||
'delivery_address' => $jo->getDeliveryAddress(),
|
'delivery_address' => $jo->getDeliveryAddress(),
|
||||||
'landmark' => $jo->getLandmark(),
|
'landmark' => $jo->getLandmark(),
|
||||||
|
|
@ -666,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();
|
||||||
|
|
@ -696,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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,12 @@ class JobOrder
|
||||||
*/
|
*/
|
||||||
protected $mode_of_payment;
|
protected $mode_of_payment;
|
||||||
|
|
||||||
|
// OR number
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=80, nullable=true)
|
||||||
|
*/
|
||||||
|
protected $or_num;
|
||||||
|
|
||||||
// name to put in OR
|
// name to put in OR
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=80)
|
* @ORM\Column(type="string", length=80)
|
||||||
|
|
@ -235,6 +241,7 @@ class JobOrder
|
||||||
$this->source = 'mobile';
|
$this->source = 'mobile';
|
||||||
$this->mode_of_payment = ModeOfPayment::CASH;
|
$this->mode_of_payment = ModeOfPayment::CASH;
|
||||||
$this->or_name = '';
|
$this->or_name = '';
|
||||||
|
$this->or_num = '';
|
||||||
$this->landmark = '';
|
$this->landmark = '';
|
||||||
$this->promo_detail = '';
|
$this->promo_detail = '';
|
||||||
|
|
||||||
|
|
@ -571,6 +578,17 @@ class JobOrder
|
||||||
return $this->mode_of_payment;
|
return $this->mode_of_payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setORNum($num)
|
||||||
|
{
|
||||||
|
$this->or_num = $num;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getORNum()
|
||||||
|
{
|
||||||
|
return $this->or_num;
|
||||||
|
}
|
||||||
|
|
||||||
public function setORName($name)
|
public function setORName($name)
|
||||||
{
|
{
|
||||||
$this->or_name = $name;
|
$this->or_name = $name;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue