GET ALL NAMES
This commit is contained in:
parent
01b97a0c94
commit
f02ef8a4ec
@ -4317,7 +4317,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
$fields = array('json');
|
$fields = array('json');
|
||||||
$where_condition_array = array('isactive' => 1,'fk_form_id' =>18,'fk_pd_id' => $pdid);
|
$where_condition_array = array('isactive' => 1,'fk_form_id' =>18,'fk_pd_id' => $pdid);
|
||||||
$general_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
$general_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||||
//print_r($general_data);
|
//print_r($general_data);die();
|
||||||
if(count($general_data))
|
if(count($general_data))
|
||||||
{
|
{
|
||||||
$json = json_decode($general_data[0]['json'],true);
|
$json = json_decode($general_data[0]['json'],true);
|
||||||
@ -4325,13 +4325,16 @@ class PD_Controller extends REST_Controller {
|
|||||||
if(array_key_exists('persons_with_relationships',$json))
|
if(array_key_exists('persons_with_relationships',$json))
|
||||||
{
|
{
|
||||||
$temp_array = array();
|
$temp_array = array();
|
||||||
foreach($json['persons_with_relationships'] as $relation)
|
foreach($json['persons_with_relationships'] as $key => $relation)
|
||||||
{
|
{
|
||||||
if($relation['relation_to'] != 0 || $relation['relation_to'] != "" )
|
foreach($json['individuals'] as $ind)
|
||||||
{
|
{
|
||||||
$temp_array = array_merge($temp_array,array($relation));
|
if($relation['pd_co_applicant_id'] == $ind['pd_co_applicant_id'])
|
||||||
}
|
{
|
||||||
//print_r($relation);
|
$relation['age'] = $ind['age'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$temp_array = array_merge($temp_array,array($relation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4573,7 +4576,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get All Persons Name Invloved In a PD includes Applicants,Business Invloved and
|
//Get All Persons Name Invloved In a PD, includes Applicants,Invloved in Business
|
||||||
public function getAllPersonsName_post()
|
public function getAllPersonsName_post()
|
||||||
{
|
{
|
||||||
$pdid = $this->post('pd_id');
|
$pdid = $this->post('pd_id');
|
||||||
@ -4583,26 +4586,43 @@ class PD_Controller extends REST_Controller {
|
|||||||
$fields = array('json');
|
$fields = array('json');
|
||||||
$where_condition_array = array('isactive' => 1,'fk_form_id' =>18,'fk_pd_id' => $pdid);
|
$where_condition_array = array('isactive' => 1,'fk_form_id' =>18,'fk_pd_id' => $pdid);
|
||||||
$general_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
$general_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||||
//print_r($general_data);
|
//print_r($general_data);die();
|
||||||
if(count($general_data))
|
if(count($general_data))
|
||||||
{
|
{
|
||||||
$json = json_decode($general_data[0]['json'],true);
|
$json = json_decode($general_data[0]['json'],true);
|
||||||
//print_r($json);
|
//print_r($json);
|
||||||
if(array_key_exists('persons_with_relationships',$json))
|
if(array_key_exists('individuals',$json))
|
||||||
{
|
{
|
||||||
foreach($json['persons_with_relationships'] as $key => $persons)
|
foreach($json['individuals'] as $key => $persons)
|
||||||
{
|
{
|
||||||
$final_names[] = $persons['applicant_name'];
|
// if($persons['is_applicant'] == true || $persons['is_person_met'] == true)
|
||||||
|
// {
|
||||||
|
// $type = 1;
|
||||||
|
// }
|
||||||
|
$final_names[] = array('applicant_name' => $persons['applicant_name'],'applicant_type' => 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('companies',$json))
|
||||||
|
{
|
||||||
|
foreach($json['companies'] as $key => $persons)
|
||||||
|
{
|
||||||
|
// if($persons['is_applicant'] == true || $persons['is_person_met'] == true)
|
||||||
|
// {
|
||||||
|
// $type = 1;
|
||||||
|
// }
|
||||||
|
$final_names[] = array('applicant_name' => $persons['company_name'],'applicant_type' => 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//print_r($final_names);die();
|
||||||
//Get Details from All Business Froms
|
//Get Details from All Business Froms
|
||||||
$fields = array('json','company_id');
|
$fields = array('json','company_id');
|
||||||
$where_condition_array = array('isactive' => 1,'fk_form_id' =>13,'fk_pd_id' => $pdid);
|
$where_condition_array = array('isactive' => 1,'fk_form_id' =>13,'fk_pd_id' => $pdid);
|
||||||
$business_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
$business_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||||
|
|
||||||
//print_r($business_data);
|
//print_r($business_data);die();
|
||||||
|
|
||||||
if(count($business_data))
|
if(count($business_data))
|
||||||
{
|
{
|
||||||
@ -4614,7 +4634,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
foreach($json['persons_with_relationships'] as $key => $persons)
|
foreach($json['persons_with_relationships'] as $key => $persons)
|
||||||
{
|
{
|
||||||
$final_names[] = $persons['family_member_name'];
|
$final_names[] = array('applicant_name' => $persons['family_member_name'],'applicant_type' => 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4642,7 +4662,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
foreach($family['family_members_details'] as $key => $persons)
|
foreach($family['family_members_details'] as $key => $persons)
|
||||||
{
|
{
|
||||||
$final_names[] = $persons['family_member_name'];
|
$final_names[] = array('applicant_name' => $persons['applicant_name'],'applicant_type' => 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user