OTHER FAMILY RELATIONSHIPS
This commit is contained in:
parent
10f2b8b835
commit
2b75793982
@ -4241,9 +4241,19 @@ class PD_Controller extends REST_Controller {
|
||||
//print_r($json);
|
||||
if(array_key_exists('persons_with_relationships',$json))
|
||||
{
|
||||
$final_data['from_general_form'] = $json['persons_with_relationships'];
|
||||
$temp_array = array();
|
||||
foreach($json['persons_with_relationships'] as $relation)
|
||||
{
|
||||
if($relation['relation_to'] != 0 || $relation['relation_to'] != "" )
|
||||
{
|
||||
$temp_array = array_merge($temp_array,array($relation));
|
||||
}
|
||||
//print_r($relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
$final_data['from_general_form'] = $temp_array;
|
||||
|
||||
|
||||
//Get Details from All Business Froms
|
||||
$fields = array('json','company_id');
|
||||
@ -4254,18 +4264,20 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
if(count($business_data))
|
||||
{
|
||||
$temp_array = array();
|
||||
foreach($business_data as $business_data_key => $business)
|
||||
{
|
||||
$json = json_decode($business['json'],true);
|
||||
//print_r($json);
|
||||
if(array_key_exists('persons_with_relationships',$json))
|
||||
{
|
||||
$final_data['from_business_form'][$business['company_id']] = $json['persons_with_relationships'];
|
||||
$temp_array = array_merge($temp_array,$json['persons_with_relationships']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$final_data['from_business_form'] = $temp_array;
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user