TYP OF ACTIVIY CHANGE
This commit is contained in:
parent
151e3a917d
commit
4c64235439
@ -186,6 +186,8 @@ $route['savePDOfficerCurrentLocation'] = 'PD_Controller/savePDOfficerCurrentLoca
|
||||
$route['getPDOfficerCurrentLocation'] = 'PD_Controller/getPDOfficerCurrentLocation';
|
||||
$route['getFamilyDetails'] = 'PD_Controller/getFamilyDetailsFromBusinessAndGeneral';
|
||||
$route['getProductsFromBusiness'] = 'PD_Controller/getProductsWithTypeofActivityFromBusiness';
|
||||
$route['getAllPersonsName'] = 'PD_Controller/getAllPersonsName';
|
||||
$route['getAssetsWithLoanFromBusiness'] = 'PD_Controller/getAssetsWithLoanFromBusiness';
|
||||
// $route['savePDFormDetailsJSON'] = 'PD_Controller/savePDFormDetailsJSON';
|
||||
// $route['getPDFormDetailsJSON'] = 'PD_Controller/getPDFormDetailsJSON';
|
||||
|
||||
|
||||
@ -3634,12 +3634,12 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$temp_data = json_decode($rec[0]['json'],true);
|
||||
// print_r($temp_data);
|
||||
$final_array['profession_name'] = $temp_data['profession_name'];
|
||||
$final_array['profession_name_other'] = "";
|
||||
if(array_key_exists('profession_name_other',$temp_data))
|
||||
{
|
||||
$final_array['profession_name_other'] = $temp_data['profession_name_other'];
|
||||
}
|
||||
// $final_array['profession_name'] = $temp_data['profession_name'];
|
||||
// $final_array['profession_name_other'] = "";
|
||||
// if(array_key_exists('profession_name_other',$temp_data))
|
||||
// {
|
||||
// $final_array['profession_name_other'] = $temp_data['profession_name_other'];
|
||||
// }
|
||||
$final_array['type_of_activity'] = $temp_data['select_business_activity_type'];
|
||||
|
||||
foreach($final_array['type_of_activity'] as $f_key => $f_value)
|
||||
@ -4235,7 +4235,11 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
public function getAssetsWithLoanFromBusiness_post()
|
||||
{
|
||||
|
||||
$pd_id = $this->post('pd_id');
|
||||
$fields = array('json','company_id');
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id' =>22,'fk_pd_id' => $pdid);
|
||||
$assest_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||
print_r($assest_data);
|
||||
}
|
||||
|
||||
public function getProductsWithTypeofActivityFromBusiness_post()
|
||||
@ -4318,6 +4322,90 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Get All Persons Name Invloved In a PD includes Applicants,Business Invloved and
|
||||
public function getAllPersonsName_post()
|
||||
{
|
||||
$pdid = $this->post('pd_id');
|
||||
//echo $pdid;
|
||||
//Get Details From General Full
|
||||
$fields = array('json');
|
||||
$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);
|
||||
if(count($general_data))
|
||||
{
|
||||
$json = json_decode($general_data[0]['json'],true);
|
||||
//print_r($json);
|
||||
if(array_key_exists('persons_with_relationships',$json))
|
||||
{
|
||||
foreach($json['persons_with_relationships'] as $key => $persons)
|
||||
{
|
||||
$final_names[] = $persons['applicant_name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Get Details from All Business Froms
|
||||
$fields = array('json','company_id');
|
||||
$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);
|
||||
|
||||
//print_r($business_data);
|
||||
|
||||
if(count($business_data))
|
||||
{
|
||||
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))
|
||||
{
|
||||
foreach($json['persons_with_relationships'] as $key => $persons)
|
||||
{
|
||||
$final_names[] = $persons['family_member_name'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Get Memebers from Other Family Members form
|
||||
$fields = array('json','company_id');
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id' =>6,'fk_pd_id' => $pdid);
|
||||
$family_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||
|
||||
|
||||
|
||||
if(count($family_data))
|
||||
{
|
||||
$family_data = json_decode($family_data[0]['json'],true);
|
||||
// echo "familty";
|
||||
// print_r($family_data);die();
|
||||
foreach($family_data as $family_data_key => $family)
|
||||
{
|
||||
|
||||
if(is_array($family))
|
||||
{
|
||||
if(array_key_exists('family_members_details',$family))
|
||||
{
|
||||
foreach($family['family_members_details'] as $key => $persons)
|
||||
{
|
||||
$final_names[] = $persons['family_member_name'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['record'] = $final_names;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user