Fix edit invoice bug for rider api
This commit is contained in:
parent
cc6c00ab02
commit
45a84d1cc8
1 changed files with 9 additions and 0 deletions
|
|
@ -731,8 +731,16 @@ class RAPIController extends Controller
|
|||
return $res->getReturnResponse();
|
||||
}
|
||||
|
||||
protected function debugRequest(Request $req)
|
||||
{
|
||||
$all = $req->request->all();
|
||||
error_log(print_r($all, true));
|
||||
}
|
||||
|
||||
public function changeService(Request $req, InvoiceCreator $ic)
|
||||
{
|
||||
// $this->debugRequest($req);
|
||||
|
||||
// allow rider to change service, promo, battery and trade-in options
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$required_params = ['jo_id', 'stype_id', 'promo_id'];
|
||||
|
|
@ -801,6 +809,7 @@ class RAPIController extends Controller
|
|||
// generate new invoice
|
||||
$crit = new InvoiceCriteria();
|
||||
$crit->setServiceType($stype_id);
|
||||
$crit->setCustomerVehicle($jo->getCustomerVehicle());
|
||||
|
||||
if ($promo != null)
|
||||
$crit->addPromo($promo);
|
||||
|
|
|
|||
Loading…
Reference in a new issue