GET FAMILY DETAILS MODIFIED
This commit is contained in:
parent
f0df039932
commit
ef40e04306
@ -98,6 +98,7 @@ defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','lend
|
||||
defined('LOGTOBOT') OR define('LOGTOBOT',1);
|
||||
defined('LOGTOSYS') OR define('LOGTOSYS',1);
|
||||
defined('PROCESSJSON') OR define('PROCESSJSON',0);
|
||||
defined('BOTURL') OR define('BOTURL','https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=467975ee8e33abf1549803925eaace0f');
|
||||
|
||||
/*******************Constants PD status*********************************/
|
||||
defined('TRIGGERED') OR define('TRIGGERED','TRIGGERED'); //First time PD Trigger.
|
||||
|
||||
@ -4514,13 +4514,14 @@ class PD_Controller extends REST_Controller {
|
||||
$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);
|
||||
//print_r($general_data);die();
|
||||
$temp_array = array();
|
||||
if(count($general_data))
|
||||
{
|
||||
$json = json_decode($general_data[0]['json'],true);
|
||||
//print_r($json);
|
||||
if(array_key_exists('persons_with_relationships',$json))
|
||||
{
|
||||
$temp_array = array();
|
||||
|
||||
foreach($json['persons_with_relationships'] as $key => $relation)
|
||||
{
|
||||
foreach($json['individuals'] as $ind)
|
||||
@ -4553,6 +4554,27 @@ class PD_Controller extends REST_Controller {
|
||||
//print_r($json);
|
||||
if(array_key_exists('persons_with_relationships',$json))
|
||||
{
|
||||
|
||||
|
||||
foreach($json['persons_with_relationships'] as $person => $value)
|
||||
{
|
||||
|
||||
if(count($general_data))
|
||||
{
|
||||
$genjson = json_decode($general_data[0]['json'],true);
|
||||
foreach($genjson['companies'] as $company_key =>$company)
|
||||
{
|
||||
//print_r($compan);
|
||||
if($value['relationship_with_company_id'] == $company['company_order_id'])
|
||||
{
|
||||
$json['persons_with_relationships'][$person]['company_name'] = $company['company_name'];
|
||||
$json['persons_with_relationships'][$person]['business_years'] = $company['business_years'];
|
||||
$json['persons_with_relationships'][$person]['business_month'] = $company['business_month'];
|
||||
$json['persons_with_relationships'][$person]['business_date_formation'] = $company['business_date_object'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$temp_array = array_merge($temp_array,$json['persons_with_relationships']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ class MYHTTPCLIENT
|
||||
if(LOGTOBOT == true)
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$response = $client->post( 'https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=467975ee8e33abf1549803925eaace0f', [
|
||||
$response = $client->post( BOTURL, [
|
||||
'headers' => ['Content-Type' => 'application/json'],
|
||||
'body' => json_encode($dataToBot)
|
||||
]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user