Add support for has_motolite and flag_coolant in change service rider api call
This commit is contained in:
parent
aca818a96a
commit
d84a156a02
1 changed files with 16 additions and 4 deletions
|
|
@ -410,6 +410,7 @@ class RAPIController extends Controller
|
|||
// TODO: load the actual
|
||||
'has_warranty_doc' => false,
|
||||
'flag_coolant' => $jo->hasCoolant(),
|
||||
'has_motolite' => $cv->hasMotoliteBattery(),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
@ -780,9 +781,20 @@ class RAPIController extends Controller
|
|||
$jo->setORNum($or_num);
|
||||
|
||||
// coolant
|
||||
$flag_coolant = $req->request->get('flag_coolant', 0);
|
||||
if ($flag_coolant)
|
||||
$jo->setHasCoolant($flag_coolant);
|
||||
$flag_coolant = $req->request->get('flag_coolant', 'false');
|
||||
if ($flag_coolant == 'true')
|
||||
$jo->setHasCoolant(true);
|
||||
else
|
||||
$jo->setHasCoolant(false);
|
||||
|
||||
// has motolite battery
|
||||
$cv = $jo->getCustomerVehicle();
|
||||
$has_motolite = $req->request->get('has_motolite', 0);
|
||||
if ($has_motolite)
|
||||
$cv->setHasMotoliteBattery(true);
|
||||
else
|
||||
$cv->setHasMotoliteBattery(false);
|
||||
$em->persist($cv);
|
||||
|
||||
// check battery id
|
||||
$batt_id = $req->request->get('batt_id', null);
|
||||
|
|
@ -815,7 +827,7 @@ class RAPIController extends Controller
|
|||
// generate new invoice
|
||||
$crit = new InvoiceCriteria();
|
||||
$crit->setServiceType($stype_id);
|
||||
$crit->setCustomerVehicle($jo->getCustomerVehicle());
|
||||
$crit->setCustomerVehicle($cv);
|
||||
$crit->setHasCoolant($jo->hasCoolant());
|
||||
|
||||
if ($promo != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue