From 31e1d2aa21c7a9f18bc5314f60a81d6d28517110 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Thu, 22 Aug 2019 15:07:09 +0530 Subject: [PATCH] GET LENDER LIST API2 --- api/application/controllers/PD_Controller.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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