diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index e060876d..e9e35a28 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -8349,6 +8349,20 @@ class PD_Controller extends REST_Controller { $records = $this->post('records'); $lender_contact_persons = $this->PD_Model->getLenderContactPersons($records['fk_lender_id'],$records['pd_branch_id']); - print_r($lender_contact_persons); + if(count($lender_contact_persons)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] =$lender_contact_persons; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NOT_MODIFIED; + $data['msg'] = 'No Lender Profile was found under selected branch. Create Lender profile in this branch'; + $this->response($data,REST_Controller::HTTP_OK); + + } } } \ No newline at end of file