diff --git a/api/application/config/routes.php b/api/application/config/routes.php index 73f20f8a..d349b912 100644 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -135,6 +135,7 @@ $route['getEntityRegionCityMap'] = 'Entity_Management_Controller/getEntityRegion $route['saveVendorCityMapping'] = 'Entity_Management_Controller/saveVendorCityMapping'; $route['getVendorCityMap'] = 'Entity_Management_Controller/getVendorCityMap'; $route['saveLenderBranches'] = 'Entity_Management_Controller/saveLenderBranches'; +$route['listLenderBranches'] = 'Entity_Management_Controller/listLenderBranches'; //PD RELATED $route['triggerNewPD'] = 'PD_Controller/triggerNewPD'; diff --git a/api/application/controllers/Entity_Management_Controller.php b/api/application/controllers/Entity_Management_Controller.php index 07cbca40..d01af460 100644 --- a/api/application/controllers/Entity_Management_Controller.php +++ b/api/application/controllers/Entity_Management_Controller.php @@ -561,4 +561,29 @@ class Entity_Management_Controller extends REST_Controller { } + public function listLenderBranches_get() + { + $entity_id = $this->get('entityid'); + + $fields = array('entity_lender_branch_id', 'branch_name'); + $where_condition_array = array('fk_entity_id' => $entity_id,'isactive'=>1); + $records = $this->Entity_Management_Model->selectCustomRecords($fields,$where_condition_array,ENTITYLENDERBRANCH); + + if(count($records)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $records; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NO_CONTENT; + $data['msg'] = "No Data Available"; + $this->response($data,REST_Controller::HTTP_OK); + } + } + + } \ No newline at end of file