with or without city_id - getSMCVendorList : ps

This commit is contained in:
sanjeev 2021-11-25 18:08:00 +05:30
parent 08489811da
commit 82d36ea240
2 changed files with 3 additions and 1 deletions

View File

@ -1804,7 +1804,7 @@ public function filterSalesPDList_post() {
function getCityWiseAgency_get(){
$city_id = $this->get('city_id');
$city_id = $this->get('city_id') ? $this->get('city_id') : "";
$Lenderlist = $this->PD_Model->getCityWiseSMCAgency($city_id);
$data = (!empty($Lenderlist))
? array('dataStatus' => true,'status' => REST_Controller::HTTP_OK,'records' => $Lenderlist)

View File

@ -2292,7 +2292,9 @@ class PD_Model extends SPARQ_Model {
$this->db->select('AGENCYLIST.agency_id as entity_id, AGENCYLIST.agency_name as full_name, AGENCYLIST.agency_abbr as short_name,AGENCYLIST.fk_city_id');
$this->db->from(AGENCYLIST.' as AGENCYLIST');
$this->db->where('AGENCYLIST.isactive',1);
if($city!=""){
$this->db->like('AGENCYLIST.fk_city_id',"'".$city."'");
}
$result = $this->db->get()->result_array();
return $result;