Add checking if reason is administrative. #738

This commit is contained in:
Korina Cordero 2023-02-13 02:05:18 +00:00
parent 87846040b6
commit 5dc4d9f3f8

View file

@ -1661,11 +1661,15 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
$em->persist($obj); $em->persist($obj);
$em->flush(); $em->flush();
// check the reason. if administrative, do not send SMS
if ($obj->getReason() != JORejectionReason::ADMINISTRATIVE)
{
// check if hub has valid mobile number // check if hub has valid mobile number
$phone_number = $this->country_code . $hub->getNotifNumber(); $phone_number = $this->country_code . $hub->getNotifNumber();
if (!empty($phone_number)) if (!empty($phone_number))
$this->sendSMSHubRejection($phone_number, $obj, $jo); $this->sendSMSHubRejection($phone_number, $obj, $jo);
} }
}
return $error_array; return $error_array;