diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php index 85273636..d5f552b5 100755 --- a/app/Controllers/Notifications.php +++ b/app/Controllers/Notifications.php @@ -722,7 +722,7 @@ class Notifications extends BaseController $model = new NotificationModel(); $today = date('Y-m-d'); $model->setTable('notification_campaign'); - $where = ['scheduled_date'=>$today]; + $where = ['scheduled_date'=>$today,'isactive'=>1]; $notification_campaign_result = $model->where($where)->findAll(); return $notification_campaign_result; } @@ -733,7 +733,7 @@ class Notifications extends BaseController { $model = new NotificationModel(); $model->setTable('templates'); - $where = ['template_id'=>$template_id]; + $where = ['template_id'=>$template_id,'isactive'=>1]; $result = $model->where($where)->first(); return $result; } @@ -751,7 +751,7 @@ class Notifications extends BaseController // echo "gid".$group_id; $model = new NotificationModel(); $model->setTable('customer_groups'); - $customer_group_result = $model->where(['group_id'=>$group_id])->findAll(); + $customer_group_result = $model->where(['group_id'=>$group_id,'isactive'=>1])->findAll(); $db = \Config\Database::connect(); if(count($customer_group_result)) {