Remove warranty creation when service type is battery replacement under warranty. #270

This commit is contained in:
Korina Cordero 2019-10-18 07:07:16 +00:00
parent a209475849
commit 26d2dab6d8
2 changed files with 4 additions and 8 deletions

View file

@ -635,10 +635,8 @@ class RAPIController extends Controller
];
$mclient->sendEvent($jo, $payload);
// TODO: verify if we need to create warranty for battery replacement under warranty
// create the warranty if new battery or battery replacement
if (($jo->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_NEW) ||
($jo->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_WARRANTY))
// create the warranty if new battery only
if ($jo->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_NEW)
{
$this->createWarranty($jo);
}

View file

@ -705,10 +705,8 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
$mclient->sendEvent($obj, $payload);
$mclient->sendRiderEvent($obj, $payload);
// TODO: verify if we need to create warranty for battery replacement under warranty
// create the warranty if new battery or battery replacement
if (($obj->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_NEW) ||
($obj->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_WARRANTY))
// create the warranty if new battery only
if ($obj->getServiceType () == CMBServiceType::BATTERY_REPLACEMENT_NEW)
{
$this->createWarranty($obj);
}