Modify the checking if service type is new battery. #336
This commit is contained in:
parent
4f9e7959b5
commit
c81a56c6e6
3 changed files with 5 additions and 5 deletions
|
|
@ -916,7 +916,7 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
||||||
$this->rah->fulfillJobOrder($obj, $image_url, $rider);
|
$this->rah->fulfillJobOrder($obj, $image_url, $rider);
|
||||||
|
|
||||||
// create the warranty if new battery only
|
// create the warranty if new battery only
|
||||||
if ($obj->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_NEW)
|
if ($this->checkIfNewBattery($obj))
|
||||||
{
|
{
|
||||||
$serial = $req->request->get('warranty_code') ;
|
$serial = $req->request->get('warranty_code') ;
|
||||||
$warranty_class = $obj->getWarrantyClass();
|
$warranty_class = $obj->getWarrantyClass();
|
||||||
|
|
@ -2280,7 +2280,7 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
||||||
public function updateVehicleBattery(JobOrder $jo)
|
public function updateVehicleBattery(JobOrder $jo)
|
||||||
{
|
{
|
||||||
// check if new battery
|
// check if new battery
|
||||||
if ($jo->getServiceType() != CMBServiceType::BATTERY_REPLACEMENT_NEW)
|
if (!($this->checkIfNewBattery($jo)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// customer vehicle
|
// customer vehicle
|
||||||
|
|
|
||||||
|
|
@ -716,7 +716,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
||||||
$this->rah->fulfillJobOrder($obj, $image_url, $rider);
|
$this->rah->fulfillJobOrder($obj, $image_url, $rider);
|
||||||
|
|
||||||
// create the warranty if new battery only
|
// create the warranty if new battery only
|
||||||
if ($obj->getServiceType () == ServiceType::BATTERY_REPLACEMENT_NEW)
|
if ($this->checkIfNewBattery($obj))
|
||||||
{
|
{
|
||||||
$serial = null;
|
$serial = null;
|
||||||
$warranty_class = $obj->getWarrantyClass();
|
$warranty_class = $obj->getWarrantyClass();
|
||||||
|
|
@ -2233,7 +2233,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
||||||
public function updateVehicleBattery(JobOrder $jo)
|
public function updateVehicleBattery(JobOrder $jo)
|
||||||
{
|
{
|
||||||
// check if new battery
|
// check if new battery
|
||||||
if ($jo->getServiceType() != ServiceType::BATTERY_REPLACEMENT_NEW)
|
if (!($this->checkIfNewBattery($jo)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// customer vehicle
|
// customer vehicle
|
||||||
|
|
|
||||||
|
|
@ -523,7 +523,7 @@ class ResqRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
// create warranty
|
// create warranty
|
||||||
if ($jo->getServiceType() == ServiceType::BATTERY_REPLACEMENT_NEW)
|
if($this->jo_handler->checkIfNewBattery($jo))
|
||||||
{
|
{
|
||||||
$serial = null;
|
$serial = null;
|
||||||
$warranty_class = $jo->getWarrantyClass();
|
$warranty_class = $jo->getWarrantyClass();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue