GET COMPANY LIST
This commit is contained in:
parent
f5811c38db
commit
5fe048a0e1
@ -3835,21 +3835,30 @@ class PD_Controller extends REST_Controller {
|
||||
$records = $this->post('records');
|
||||
$pd_id = $records['pd_id'];
|
||||
// $pd_form_id = $records['pd_form_id'];
|
||||
$final_array = array();
|
||||
|
||||
$company_list = array();
|
||||
$fields = array('json');
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id'=>18,'fk_pd_id'=>$pd_id);
|
||||
$rec = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||
//print_r($this->db->last_query());
|
||||
//print_r($rec);
|
||||
|
||||
// $pd_applicant_details = $this->PD_Model->getApplicantsDetails($pd_id);
|
||||
|
||||
// foreach($pd_applicant_details as $applicant)
|
||||
// {
|
||||
// $company_list = array_merge($company_list,array($applicant['company_name']));
|
||||
// }
|
||||
|
||||
if(count($rec))
|
||||
{
|
||||
$temp_data = json_decode($rec[0]['json'],true);
|
||||
$company_list = array();
|
||||
|
||||
foreach($temp_data['companies'] as $company)
|
||||
{
|
||||
$company_list = array_merge($company_list,array($company['company_name']));
|
||||
}
|
||||
if(count($company_list))
|
||||
}
|
||||
|
||||
if(count($company_list))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
@ -3863,14 +3872,6 @@ class PD_Controller extends REST_Controller {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Kindy Fill General Form First!';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user