TEMP MOVE

This commit is contained in:
velz 2019-03-01 13:15:17 +05:30
parent a47daf3938
commit 8aa9b82c20
2 changed files with 19 additions and 15 deletions

View File

@ -4182,7 +4182,7 @@ class PD_Controller extends REST_Controller {
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
$data['pd_score'] = $this->calculateScore($pdid);
//print_r($data['pd_score']);;
//print_r($data['pd_score']);die();
//GET ALL PROCESSED JSON
for($i = 1;$i<=25;$i++)
{
@ -4194,7 +4194,7 @@ class PD_Controller extends REST_Controller {
// }
$data['pd_processed_forms'][$i] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
}
//print_r($data['pd_processed_forms']);die();
print_r($data['pd_processed_forms']);die();
// print_r(json_decode($data['pd_processed_forms'][13][0]['processed_json'],true));
// echo count($data['pd_processed_forms'][1]);
@ -5278,7 +5278,7 @@ class PD_Controller extends REST_Controller {
#####Business Assets Form Questions########
$business_assest_form = (json_decode($form_data[22][1]['processed_json'],true));
$business_assest_form = (json_decode($form_data[22][0]['processed_json'],true));
//print_r($business_assest_form);die();
if(array_key_exists('business_assets_details',$business_assest_form))
{
@ -5301,7 +5301,7 @@ class PD_Controller extends REST_Controller {
// 15 - QNO(2.6) - owned_vechile
$score_questions['business']['owned_vechile'] = $vechile_count ? 'yes':'no';
// - QNO (2.12) - business_activity seen
$score_questions['business']['business_activity_has_seen'] = $business_assest_form['business_activity'];
$score_questions['business']['business_activity_has_seen'] = isset($business_assest_form['business_activity'])? $business_assest_form['business_activity']: 'no';
}
#####End of Business Assets Form Questions########

View File

@ -357,19 +357,23 @@ class GETPROCESSEDJSON
}
$owners_list_master = array();
foreach($raw_json['owner_name_group'] as $owner_name_group_key => $owner_name_group)
if($raw_json['owner_name_group'] != null)
{
//print_r($owner_name_group);die();
$CI->db->SELECT( $master_tables_field_names['PDAPPLICANTSDETAILS'] );
$CI->db->FROM(PDAPPLICANTSDETAILS);
//$CI->db->WHERE('isactive',1);
$CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$owner_name_group['owner_name']['id']);
$owners_list= $CI->db->GET()->result_array();
//print_r($owners_list);
if(count($owners_list))
foreach($raw_json['owner_name_group'] as $owner_name_group_key => $owner_name_group)
{
$owners_list_master = array_merge($owners_list_master,array($owners_list[0][$master_tables_field_names['PDAPPLICANTSDETAILS']]));
//print_r($owner_name_group);die();
$CI->db->SELECT( $master_tables_field_names['PDAPPLICANTSDETAILS'] );
$CI->db->FROM(PDAPPLICANTSDETAILS);
//$CI->db->WHERE('isactive',1);
$CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$owner_name_group['owner_name']['id']);
$owners_list= $CI->db->GET()->result_array();
//print_r($owners_list);
if(count($owners_list))
{
$owners_list_master = array_merge($owners_list_master,array($owners_list[0][$master_tables_field_names['PDAPPLICANTSDETAILS']]));
}
}
}
$raw_json['owners_list_master'] = $owners_list_master;