FIX_Notification_issues_fixes

This commit is contained in:
VE10-Sanjeev 2024-11-14 08:20:09 +00:00
parent c26f52990b
commit 8a39ba1a54

View File

@ -598,12 +598,12 @@ class Notifications extends BaseController
$notification = new NotificationHelper();
if (empty($queryResult)) {
$this->logger->error("There is no customer expiring on date:{$newDate}");
echo " There is no customer expiring. till dated :{$newDate}";
return;
}
$emailTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_EMAIL);
echo "Started.<br> Dated = ".$newDate." <br> There are ".count($queryResult)." persons <br>";
//print_r($queryResult);die();
echo "Started.<br> Customer expiring. till dated = ".$newDate." <br> There are ".count($queryResult)." persons <br>";
foreach ($queryResult as $inx => $row) {
$status = $row['status'];
$userFirstName = $row['first_name'];
@ -621,7 +621,7 @@ class Notifications extends BaseController
if ($status === 'Approved') {
# EXPIRAY_NOTIFY_TEMPLATE_EMAIL
$emailTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_EMAIL);
echo "Person Name :".$fullName." <br>";
echo "#".$customerId." - Person Name :".$fullName." <br>";
if (count($emailTemplateName) && !empty($emailTemplateName)) {
$campaign_id = 1;
# Insertion on History Email Means Campaign ID 1 Hardcoded
@ -637,7 +637,7 @@ class Notifications extends BaseController
$emailContent = str_replace("{SCHEME_NAME}", $schemename, $emailContent);
}
if (isset($expirydate)) {
$expiryon = $expirydate ? date('d-m-Y', strtotime($expirydate)) : '';
$expiryon = $expirydate ? date('d-m-Y', strtotime($expirydate)) : '';
$emailContent = str_replace("{EXPIRY_DATE}", $expiryon, $emailContent);
}
if (isset($membership_id)) {
@ -735,7 +735,7 @@ class Notifications extends BaseController
$whatsappContent = str_replace("{SCHEME_NAME}", $schemename, $whatsappContent);
}
if (isset($expirydate)) {
$expiryon = $expirydate ? date('d-m-Y', strtotime($expirydate)) : '';
$expiryon = $expirydate ? date('d-m-Y', strtotime($expirydate)) : '';
$whatsappContent = str_replace("{EXPIRY_DATE}", $expiryon, $whatsappContent);
}
if (isset($customerId)) {