From 02099066510d5abbca08744734ed84cd5932c837 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 1 Dec 2023 17:41:35 +0530 Subject: [PATCH] Customer Group hide EXPIRYDATE : ps --- app/Controllers/Notifications.php | 4 +++- app/Models/CustomerModel.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php index a5f08ecd..954a30d9 100755 --- a/app/Controllers/Notifications.php +++ b/app/Controllers/Notifications.php @@ -203,7 +203,9 @@ class Notifications extends BaseController { $model = new NotificationModel(); $model->setTable('customer_groups'); - $details = $model->where('isactive',1)->orderBy('group_id', 'ASC')->findAll(); + // $details = $model->where('isactive',1)->orderBy('group_id', 'ASC')->findAll(); + $where = ['isactive' => 1, 'group_name != ' => 'EXPIRYDATE']; + $details = $model->where($where)->orderBy('group_id', 'ASC')->findAll(); return $details; } public function get_template_details(){ diff --git a/app/Models/CustomerModel.php b/app/Models/CustomerModel.php index 1bdfd935..666cea06 100644 --- a/app/Models/CustomerModel.php +++ b/app/Models/CustomerModel.php @@ -152,6 +152,7 @@ return $this->db->table('customer_groups as CG' ) ->join('users as U1', 'U1.user_id = CG.created_by', 'left') ->join('users as U2', 'U2.user_id = CG.updated_by', 'left') ->select('CG.group_id,CG.group_name,CG.created_on,CG.created_by,CG.updated_on,CG.updated_by,DATE_FORMAT(CG.created_on, "%d/%m/%Y %h:%i %p") AS formatted_created_on,concat(U1.first_name," ",U1.last_name) as created_by_name,concat(U2.first_name," ",U2.last_name) as updated_by_name,CG.isactive') +->where(['CG.group_name != ' => 'EXPIRYDATE']) // ->where(['CG.isactive' => 1]) ->get() ->getResultArray();