From 93039d64a35ff828e298593a94779201f3a27eba Mon Sep 17 00:00:00 2001 From: sanjeev Date: Wed, 24 Nov 2021 17:44:35 +0530 Subject: [PATCH] role id for officer list : ps --- api/application/controllers/SMC_Credit_PD_Controller.php | 7 ++++--- api/application/models/PD_Model.php | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/application/controllers/SMC_Credit_PD_Controller.php b/api/application/controllers/SMC_Credit_PD_Controller.php index 9f3ebfd5..7615b2ea 100644 --- a/api/application/controllers/SMC_Credit_PD_Controller.php +++ b/api/application/controllers/SMC_Credit_PD_Controller.php @@ -1816,9 +1816,10 @@ public function filterSalesPDList_post() { //2 roles = SMC Vendor PD officer and SMC Vendor PD manager function getSMCVendorPDOfficersList_get(){ - $role_id = $this->get('role_id'); - $entity_id = $this->get('entity_id'); - $Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id); + // $role_id = $this->get('role_id'); + // $entity_id = $this->get('entity_id'); + // $Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id); + $Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList(); $data = (!empty($Lenderlist)) ? array('dataStatus' => true,'status' => REST_Controller::HTTP_OK,'records' => $Lenderlist) : array('dataStatus' => false,'status' => REST_Controller::HTTP_NOT_FOUND,'msg' =>'No Records Found!'); diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index c27302ef..5b5bb0b3 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -2289,10 +2289,11 @@ class PD_Model extends SPARQ_Model { } - function getSMCVendorPDOfficersList($role,$entity){ - if(empty($role)){ - $role = array(28,29); - } + function getSMCVendorPDOfficersList(){ + // if(empty($role)){ + // $role = array(28,29); + $role = array(29); + // } $this->db->select('USERPROFILE.userid, concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name, USERPROFILE.email, USERPROFILE.mobile_no,USERPROFILEROLES.user_role,ROLES.role_name, ROLES.role_description'); $this->db->from(USERPROFILE.' as USERPROFILE'); $this->db->join(USERPROFILEROLES.' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive = 1','LEFT');