diff --git a/app/Config/Constants.php b/app/Config/Constants.php
index b81ff2d9..9b155a50 100755
--- a/app/Config/Constants.php
+++ b/app/Config/Constants.php
@@ -127,8 +127,6 @@ define('SMTP_PORT', getenv('SMTP_PORT'));
define('SEND_WAAI_URL', 'https://waai.in/api/send');
define('SEND_WAAI_GROUP_URL', 'https://waai.in/api/send_group');
-define('EXPIRAY_NOTIFY_TEMPLATE_EMAIL','EXPIRAY_NOTIFY_TEMPLATE_EMAIL');
-define('EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP','EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP');
define('PAYTM_ENVIRONMENT', 'PROD'); // PROD
//Change this constant's value with Merchant key received from Paytm.
//define('PAYTM_MERCHANT_KEY', '-');
diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php
index 8483ad9c..6f271b3b 100755
--- a/app/Controllers/Notifications.php
+++ b/app/Controllers/Notifications.php
@@ -390,7 +390,7 @@ class Notifications extends BaseController
$model->setTable('templates');
$details = $model
->where(['templates.isactive' => 1])
- ->whereNotIn('templates.template_name',array('EXPIRAY_NOTIFY_TEMPLATE_EMAIL','EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP'))
+ ->whereNotIn('templates.template_name',array('EXPIRY NOTIFY TEMPLATE EMAIL','EXPIRY NOTIFY TEMPLATE WHATSAPP'))
->orderBy('templates.template_id', 'ASC')->findAll();
return $details;
}
@@ -604,7 +604,7 @@ class Notifications extends BaseController
return;
}
- $emailTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_EMAIL);
+ $emailTemplateName = $NotificationModel->getTempName('EXPIRY NOTIFY TEMPLATE EMAIL');
echo "Started.
Customer expiring. till dated = ".$newDate."
There are ".count($queryResult)." persons
";
foreach ($queryResult as $inx => $row) {
$status = $row['status'];
@@ -621,8 +621,8 @@ class Notifications extends BaseController
continue;
}
if ($status === 'Approved') {
- # EXPIRAY_NOTIFY_TEMPLATE_EMAIL
- $emailTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_EMAIL);
+ # EXPIRY NOTIFY TEMPLATE EMAIL
+ $emailTemplateName = $NotificationModel->getTempName('EXPIRY NOTIFY TEMPLATE EMAIL');
echo "#".$customerId." - Person Name :".$fullName."
";
if (count($emailTemplateName) && !empty($emailTemplateName)) {
$campaign_id = 1;
@@ -649,7 +649,7 @@ class Notifications extends BaseController
$emailData = [
- 'template_name' => 'EXPIRAY_NOTIFY_TEMPLATE_EMAIL',
+ 'template_name' => 'EXPIRY NOTIFY TEMPLATE EMAIL',
'recipient_email' => $row['email'],
'subject' => 'Your Subscription Expiry Notification',
'description' => $emailContent,
@@ -691,7 +691,7 @@ class Notifications extends BaseController
echo ($inx+1).") Failed to send email
";
}
} else {
- $history_msg = 'There is no email template found by the name of EXPIRAY_NOTIFY_TEMPLATE_EMAIL';
+ $history_msg = 'There is no email template found by the name of EXPIRY NOTIFY TEMPLATE EMAIL';
// $receiving_status = 0 ;
$this->logger->error($history_msg);
echo $history_msg."
";
@@ -702,10 +702,10 @@ class Notifications extends BaseController
else{
$this->logger->error("status is Draft");
}
- # EXPIRAY_NOTIFY_TEMPLATE_EMAIL Closed
+ # EXPIRY NOTIFY TEMPLATE EMAIL Closed
if ($status === 'Approved') {
- # EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP
- $whatsappTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP);
+ # EXPIRY NOTIFY TEMPLATE WHATSAPP
+ $whatsappTemplateName = $NotificationModel->getTempName('EXPIRY NOTIFY TEMPLATE WHATSAPP');
// print_r($whatsappTemplateName);die;
if ((count($whatsappTemplateName) > 0) && !empty($whatsappTemplateName)) {
$campaign_id = 2; // hardcoded because static Template.
@@ -798,7 +798,7 @@ class Notifications extends BaseController
continue;
}
- # EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP Closed
+ # EXPIRY NOTIFY TEMPLATE WHATSAPP Closed
}
else{
$this->logger->error("status is draft");
diff --git a/app/Models/NotificationModel.php b/app/Models/NotificationModel.php
index 359307ec..6237fc2e 100755
--- a/app/Models/NotificationModel.php
+++ b/app/Models/NotificationModel.php
@@ -43,7 +43,7 @@ class NotificationModel extends Model
->join('users as U1', 'U1.user_id = T.created_by', 'left')
->join('users as U2', 'U2.user_id = T.updated_by', 'left')
->select('T.template_id,T.template_name,T.mode,T.created_on,T.created_by,T.updated_on,T.updated_by,DATE_FORMAT(T.created_on, "%d/%m/%Y %h:%i %p") AS formatted_created_on,CONCAT_WS(" ", U1.first_name, U1.last_name) as created_by_name,CONCAT_WS(" ", U2.first_name, U2.last_name) as updated_by_name,T.isactive')
- // ->whereNotIn('T.template_name',array('EXPIRAY_NOTIFY_TEMPLATE_EMAIL','EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP'))
+ // ->whereNotIn('T.template_name',array('EXPIRY NOTIFY TEMPLATE EMAIL','EXPIRY NOTIFY TEMPLATE WHATSAPP'))
->get()->getResultArray();
}
@@ -90,7 +90,7 @@ public function getCampaignDetails(){
->join('users as U2', 'U2.user_id = NC.updated_by', 'left')
->join('templates as T', 'T.template_id = NC.template_id', 'left')
->select('NC.campaign_id,NC.campaign_name,T.template_id,T.template_name,NC.mode,NC.created_on,NC.created_by,NC.updated_on,NC.updated_by,DATE_FORMAT(NC.created_on, "%d/%m/%Y %h:%i %p") AS formatted_created_on,CONCAT_WS(" ", U1.first_name, U1.last_name) as created_by_name,CONCAT_WS(" ", U2.first_name, U2.last_name) as updated_by_name,NC.isactive,NC.group_id,NC.scheduled_date,if(NC.scheduled_time IS NULL ,"",NC.scheduled_time) as scheduled_time')
- ->whereNotIn('T.template_name',array('EXPIRAY_NOTIFY_TEMPLATE_EMAIL','EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP'))
+ ->whereNotIn('T.template_name',array('EXPIRY NOTIFY TEMPLATE EMAIL','EXPIRY NOTIFY TEMPLATE WHATSAPP'))
->get()->getResultArray();
if (!empty($result)) {