getSMCVendorList changed to State : ps

This commit is contained in:
sanjeev 2021-12-27 20:57:48 +05:30
parent 5f625ec7e9
commit c8ac561481
3 changed files with 7 additions and 7 deletions

View File

@ -328,7 +328,7 @@ $route['getRequestForDataDump'] = 'Request_DataDump_Controller/getRequestForData
$route['getMasterForDataDump'] = 'Request_DataDump_Controller/getMasterForDataDump';
$route['downloadDataDump'] = 'Request_DataDump_Controller/downloadDataDump2';
$route['getSMCVendorList'] = 'SMC_Credit_PD_Controller/getCityWiseAgency';
$route['getSMCVendorList'] = 'SMC_Credit_PD_Controller/getStateWiseAgency';
$route['getSMCVendorPDOfficersList'] = 'SMC_Credit_PD_Controller/getSMCVendorPDOfficersList';
//Template V2 (Dynamical)

View File

@ -1802,10 +1802,10 @@ public function filterSalesPDList_post() {
}
function getCityWiseAgency_get(){
function getStateWiseAgency_get(){
$city_id = $this->get('city_id') ? $this->get('city_id') : "";
$Lenderlist = $this->PD_Model->getCityWiseSMCAgency($city_id);
$state_id = $this->get('state_id') ? $this->get('state_id') : "";
$Lenderlist = $this->PD_Model->getStateWiseSMCAgency($state_id);
$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!');

View File

@ -2298,12 +2298,12 @@ class PD_Model extends SPARQ_Model {
//Get SMC CityWise Agency
function getCityWiseSMCAgency($city){
function getStateWiseSMCAgency($state){
$this->db->select('AGENCYLIST.agency_id as entity_id, AGENCYLIST.agency_name as name,AGENCYLIST.agency_name as full_name, AGENCYLIST.agency_abbr as short_name,AGENCYLIST.fk_city_id,AGENCYLIST.mail_id');
$this->db->from(AGENCYLIST.' as AGENCYLIST');
$this->db->where('AGENCYLIST.isactive',1);
if($city!=""){
$this->db->like('AGENCYLIST.fk_city_id',"'".$city."'");
if($state!=""){
$this->db->like('AGENCYLIST.fk_state_id',"'".$state."'");
}
$result = $this->db->get()->result_array();
return $result;