FI - ID report : ps

This commit is contained in:
VE10-Sanjeev 2022-10-10 08:59:11 +05:30
parent ebfb737ead
commit bb94b66442
3 changed files with 177 additions and 205 deletions

View File

@ -562,6 +562,18 @@ class PD_Controller extends REST_Controller
? (!is_null($pd_details['is_notify_enabled']) ? $pd_details['is_notify_enabled'] : 1 ) ? (!is_null($pd_details['is_notify_enabled']) ? $pd_details['is_notify_enabled'] : 1 )
: ($lender_short_name == 'IIB' ? 0 : 1 ); : ($lender_short_name == 'IIB' ? 0 : 1 );
if($lender_short_name == 'IIB'){
// IIB means 0
$pd_details['is_notify_enabled'] = 0;
}else{
if(isset($pd_details['is_notify_enabled']) && (!is_null($pd_details['is_notify_enabled']))){
$pd_details['is_notify_enabled'] = $pd_details['is_notify_enabled'];
}
else{
// Default 1
$pd_details['is_notify_enabled'] = 1;
}
}
$pd_id = $this->PD_Model->saveRecords($pd_details, PDTRIGGER); $pd_id = $this->PD_Model->saveRecords($pd_details, PDTRIGGER);
@ -2726,9 +2738,17 @@ class PD_Controller extends REST_Controller
$processed_json = GETPROCESSEDJSON::convertFIAddressForm($records, $formid); $processed_json = GETPROCESSEDJSON::convertFIAddressForm($records, $formid);
break; break;
case 29: case 29:
$processed_json = $records;
break;
case 30: case 30:
$processed_json = $records;
break;
case 31: case 31:
$processed_json = $records;
break;
case 32: case 32:
$processed_json = $records;
break;
case 33: case 33:
$processed_json = $records; $processed_json = $records;
break; break;
@ -3983,6 +4003,7 @@ class PD_Controller extends REST_Controller
} }
// Get all assigned pd forms associated with this pd from template_forms table // Get all assigned pd forms associated with this pd from template_forms table
// pdtype 4 is template_id ella.
if ($template_id == null) { if ($template_id == null) {
$columns = array('TEMPLATEFORMS.form_id', 'PDFORMS.pd_form_name'); $columns = array('TEMPLATEFORMS.form_id', 'PDFORMS.pd_form_name');
$table = TEMPLATEFORMS . ' as TEMPLATEFORMS'; $table = TEMPLATEFORMS . ' as TEMPLATEFORMS';
@ -4019,6 +4040,7 @@ class PD_Controller extends REST_Controller
foreach ($final_data_to_response as $key => $value) { foreach ($final_data_to_response as $key => $value) {
$object->$key = $value; $object->$key = $value;
} }
if($final_data_to_response['fk_pd_type'] == 4){ $final_data_to_response = 1; }
if (count($final_data_to_response)) { if (count($final_data_to_response)) {
$data['dataStatus'] = true; $data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK; $data['status'] = REST_Controller::HTTP_OK;
@ -5747,6 +5769,8 @@ class PD_Controller extends REST_Controller
if ($data['pd_master_details'][0]['is_score_card_enabled'] == 1 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL" && $data['pd_master_details'][0]['customer_segment_abbr'] != "SE-RI")) // && $data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CHQ")) //&& ($data['pd_master_details'][0]['customer_segment_abbr'] != '')) if ($data['pd_master_details'][0]['is_score_card_enabled'] == 1 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL" && $data['pd_master_details'][0]['customer_segment_abbr'] != "SE-RI")) // && $data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CHQ")) //&& ($data['pd_master_details'][0]['customer_segment_abbr'] != ''))
{ {
//echo $data['pd_master_details'][0]['is_score_card_enabled'].'-'.$data['pd_master_details'][0]['customer_segment_abbr'];die(); //echo $data['pd_master_details'][0]['is_score_card_enabled'].'-'.$data['pd_master_details'][0]['customer_segment_abbr'];die();
if ($data['pd_master_details'][0]['fk_pd_type'] != 4) {
$data['pd_score'] = $this->calculateScore($pdid); $data['pd_score'] = $this->calculateScore($pdid);
$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'], 1) : 0; $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'], 1) : 0;
//echo $score_for_chart;die(); //echo $score_for_chart;die();
@ -5778,12 +5802,12 @@ class PD_Controller extends REST_Controller
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content); $base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
$data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url; $data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url;
//echo $data['base64_pdscore_chart_url']; //echo $data['base64_pdscore_chart_url'];
}
//GENERATE CHART PART //GENERATE CHART PART
} }
//die(); //die();
//GET ALL PROCESSED JSON //GET ALL PROCESSED JSON
for ($i = 1; $i <= 30; $i++) { for ($i = 1; $i <= 35; $i++) {
$fields = array('processed_json'); $fields = array('processed_json');
if ($i == 25) { if ($i == 25) {
$fields = array('json'); $fields = array('json');
@ -5855,7 +5879,7 @@ class PD_Controller extends REST_Controller
// print_r($data['add_on_pd_images']); // print_r($data['add_on_pd_images']);
// die(); // die();
// print_r($data);die();
$t = ""; $t = "";
if (!count($add_on_pd)) { if (!count($add_on_pd)) {
@ -10708,4 +10732,6 @@ class PD_Controller extends REST_Controller
unlink($destination_path.$dbfile); unlink($destination_path.$dbfile);
} }
} }
} }

View File

@ -2730,7 +2730,7 @@ class GETPROCESSEDJSON
foreach($raw_json['json'] as $raw_json_key => $address) foreach($raw_json['json'] as $raw_json_key => $address)
{ {
if(array_key_exists('address_type',$address)) if(array_key_exists('Address_Type',$address))
{ {
$CI->db->SELECT( $master_tables_field_names['ADDRESSTYPE'] ); $CI->db->SELECT( $master_tables_field_names['ADDRESSTYPE'] );
$CI->db->FROM(ADDRESSTYPE); $CI->db->FROM(ADDRESSTYPE);
@ -2849,143 +2849,56 @@ class GETPROCESSEDJSON
{ {
$raw_json['json'][$raw_json_key]['uom_master'] = $uom[0][$master_tables_field_names['UOM']]; $raw_json['json'][$raw_json_key]['uom_master'] = $uom[0][$master_tables_field_names['UOM']];
} }
} }
} }
if(isset($raw_json['json']['is_pd_done_on_initiated_address']) && ($raw_json['json']['is_pd_done_on_initiated_address'] == "no") )
if(isset($raw_json['json']['is_pd_done_on_initiated_address']) && ($raw_json['json']['is_pd_done_on_initiated_address'] == "") ) {
{ if(array_key_exists('State_list',$address))
foreach($raw_json['json'] as $raw_json_key => $address)
{
// GET KEYS FROM MASTER TABLE FOR SUPPLIER FORM
// $fields = array('question', 'key', 'ismaster', 'master_name');
// $where_condition_array = array('fk_form_id' => $formid,'isactive' => 1);
// $master_keys = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,QUESTIONKEYMAPPING);
if(array_key_exists('Address_Type',$address))
{
$CI->db->SELECT( $master_tables_field_names['ADDRESSTYPE'] );
$CI->db->FROM(ADDRESSTYPE);
$CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['ADDRESSTYPE'] ,$address['Address_Type']);
$adress_type_name= $CI->db->GET()->result_array();
//print_r($CI->db->last_query());
if(count($adress_type_name))
{
$raw_json['json'][$raw_json_key]['address_type_master'] = $adress_type_name[0][$master_tables_field_names['ADDRESSTYPE']];
}
}
if(array_key_exists('Locality',$address))
{
$CI->db->SELECT( $master_tables_field_names['LOCALITY'] );
$CI->db->FROM(LOCALITY);
$CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['LOCALITY'] ,$address['Locality']);
$locality_name= $CI->db->GET()->result_array();
//print_r($CI->db->last_query());
if(count($locality_name))
{
$raw_json['json'][$raw_json_key]['locality_master'] = $locality_name[0][$master_tables_field_names['LOCALITY']];
}
}
if(array_key_exists('Approach_to_PD_location',$address))
{
$CI->db->SELECT( $master_tables_field_names['PDLOCATIONAPPROACH'] );
$CI->db->FROM(PDLOCATIONAPPROACH);
$CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['PDLOCATIONAPPROACH'] ,$address['Approach_to_PD_location']);
$pd_location_approach= $CI->db->GET()->result_array();
//print_r($CI->db->last_query());
if(count($pd_location_approach))
{
$raw_json['json'][$raw_json_key]['pd_location_master'] = $pd_location_approach[0][$master_tables_field_names['PDLOCATIONAPPROACH']];
}
}
if(array_key_exists('Comment_on_Locality',$address))
{
$CI->db->SELECT( $master_tables_field_names['COMMENTSONLOCALITY'] );
$CI->db->FROM(COMMENTSONLOCALITY);
$CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['COMMENTSONLOCALITY'] ,$address['Comment_on_Locality']);
$comments_on_locality= $CI->db->GET()->result_array();
//print_r($CI->db->last_query());
if(count($comments_on_locality))
{
$raw_json['json'][$raw_json_key]['comment_locality_master'] = $comments_on_locality[0][$master_tables_field_names['COMMENTSONLOCALITY']];
}
}
if(array_key_exists('state',$address))
{ {
//print_r($address); //print_r($address);
$CI->db->SELECT( $master_tables_field_names['STATE'] ); $CI->db->SELECT( $master_tables_field_names['STATE'] );
$CI->db->FROM(STATE); $CI->db->FROM(STATE);
$CI->db->WHERE('isactive',1); $CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['STATE'] ,$address['state']); $CI->db->WHERE($master_tables_pkid['STATE'] ,$address['State_list']);
$adress_type_name= $CI->db->GET()->result_array(); $adress_type_name= $CI->db->GET()->result_array();
//print_r($CI->db->last_query()); //print_r($CI->db->last_query());
if(count($adress_type_name)) if(count($adress_type_name))
{ {
$raw_json['json'][$raw_json_key]['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']]; $raw_json['json'][$raw_json_key]['state2_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
} }
} }
if(array_key_exists('city',$address)) if(array_key_exists('city2',$address))
{ {
//print_r($address); //print_r($address);
$CI->db->SELECT( $master_tables_field_names['CITY'] ); $CI->db->SELECT( $master_tables_field_names['CITY'] );
$CI->db->FROM(CITY); $CI->db->FROM(CITY);
$CI->db->WHERE('isactive',1); $CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['CITY'] ,$address['city']); $CI->db->WHERE($master_tables_pkid['CITY'] ,$address['city2']);
$city= $CI->db->GET()->result_array(); $city= $CI->db->GET()->result_array();
//print_r($CI->db->last_query()); //print_r($CI->db->last_query());
if(count($city)) if(count($city))
{ {
$raw_json['json'][$raw_json_key]['city_master'] = $city[0][$master_tables_field_names['CITY']]; $raw_json['json'][$raw_json_key]['city2_master'] = $city[0][$master_tables_field_names['CITY']];
} }
} }
if(array_key_exists('pincode',$address)) if(array_key_exists('pincode2',$address))
{ {
//print_r($address); //print_r($address);
$CI->db->SELECT( $master_tables_field_names['PINCODE'] ); $CI->db->SELECT( $master_tables_field_names['PINCODE'] );
$CI->db->FROM(PINCODE); $CI->db->FROM(PINCODE);
$CI->db->WHERE('isactive',1); $CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['PINCODE'] ,$address['pincode']); $CI->db->WHERE($master_tables_pkid['PINCODE'] ,$address['pincode2']);
$pincode= $CI->db->GET()->result_array(); $pincode= $CI->db->GET()->result_array();
//print_r($CI->db->last_query()); //print_r($CI->db->last_query());
if(count($pincode)) if(count($pincode))
{ {
$raw_json['json'][$raw_json_key]['pincode_master'] = $pincode[0][$master_tables_field_names['PINCODE']]; $raw_json['json'][$raw_json_key]['pincode2_master'] = $pincode[0][$master_tables_field_names['PINCODE']];
} }
} }
if(array_key_exists('Unit_of_Measurement',$address))
{
//print_r($address);
$CI->db->SELECT( $master_tables_field_names['UOM'] );
$CI->db->FROM(UOM);
$CI->db->WHERE('isactive',1);
$CI->db->WHERE($master_tables_pkid['UOM'] ,$address['Unit_of_Measurement']);
$uom= $CI->db->GET()->result_array();
//print_r($CI->db->last_query());
if(count($uom))
{
$raw_json['json'][$raw_json_key]['uom_master'] = $uom[0][$master_tables_field_names['UOM']];
}
}
}
} }
return ($raw_json);
return ($raw_json);
} }
/*****************########## END OF FI-ADDRESS FORM DETAILS ##########**************/ /*****************########## END OF FI-ADDRESS FORM DETAILS ##########**************/
} }

View File

@ -416,48 +416,37 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">General Information: </h3>'; echo '<h3 contenteditable="true">General Information: </h3>';
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true); $general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details; $all_applicant_details = $applicants_details;
foreach ($general_form as $key => $value) if ($value['is_person_met'] == 'yes') {
{ echo '<p>' . 'Applicant ('.$value['Name_of_the_Person_met'].') was met at the visited address.' . '</p>';
?> }else if ($value['is_person_met'] == 'no') {
<br> echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>';
` <?php }
if ($value['is_person_met'] == 'yes') { if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
echo '<p>' . 'Applicant ('.$value['Name_of_the_Person_met'].') was met at the visited address.' . '</p>'; echo '<p>' . $general_form['general_remark'] . '</p>';
}else if ($value['is_person_met'] == 'no') { }
echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>'; ?>
}
if ($general_form['general_remark'] != "") {
echo '<p>' . $general_form['general_remark'] . '</p>';
}}
?>`
<!-- ####################### general information ends ############################--> <!-- ####################### general information ends ############################-->
<!-- ####################### address details ############################--> <!-- ####################### address details ############################-->
<?php <?php
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true); $address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
print_r($address_form); $address_value = $address_form['json'];
if(!empty($address_value)){
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'], true); echo '<h3 contenteditable="true">Address Details: </h3>';
if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
$address_images = $pd_images[5];
foreach ($address_form as $key => $value)
{
if ($value['is_pd_done_on_initiated_address'] == 'yes') {
echo '<p>' . ' echo '<p>' . '
Visit Initiated Address: '.$value['initiated_address'].' , '.$value['city_master'].' , '.$value['state_master'].' , '.$value['pincode_master'].'. </p>'; Visit Initiated Address: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'. </p>';
} }
if ($value['is_pd_done_on_initiated_address'] == 'no') { if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
echo '<p>' . ' echo '<p>' . '
Address Where Visit is Initiated: '.$value['initiated_address'].' , '.$value['city_master'].' , '.$value['state_master'].' , '.$value['pincode_master'].'. Address Where Visit is Initiated: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
Address Where Visit was actually done: '.$value['initiated_address'].' , '.$value['city_master'].' , '.$value['state_master'].' , '.$value['pincode_master'].'. Address Where Visit was actually done: '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
Reason for change in Visit address: (Entered reason for change in address should appear here). Reason for change in Visit address: '.$address_value['end_use'].'.</p>';
The Field Visit was done at Residence/Office/Shop of the loan applicants. The Residence/Shop/Office is located in a Residential/Industrial Area and the estimated area of the Residence/Shop/Office is 700 Square Feet. The location was Very Easy to locate & Reach. As Per Officer, the Residence/Shop/Office is situated in a Good/Poor Locality. ' . '</p>';
} }
echo '<p>' . 'The Field Visit was done at '.$address_value['address_type_master'].' of the loan applicants. The '.$address_value['address_type_master'].' is located in a '.$address_value['locality_master'].' and the estimated area of the '.$address_value['address_type_master'].' is '.$address_value['uom_master'].'. The location was '.$address_value['Approach_to_PD_location'].'. As Per Officer, the '.$address_value['address_type_master'].' is situated in a '.$address_value['comment_locality_master'].' Locality. ' . '</p>';
} }
?> ?>
<div id="page_break"></div> <div id="page_break"></div>
@ -466,109 +455,156 @@ defined('BASEPATH') or exit('No direct script access allowed');
<!-- ####################### office visit DI ############################--> <!-- ####################### office visit DI ############################-->
<?php <?php
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">VISIT DETAILS: </h3>'; echo '<h3 contenteditable="true">Visit Details: </h3>';
$Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true); $Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true);
$ov_value = $Office_visit_data['json'];
$business_activities_during_visit = implode(', ', $ov_value['Was_any_business_activities_observed_during_visit']);
$company_name_sighted = $ov_value['was_the_company_name_board_sighted'] == 'Yes' ? 'seen' : 'not seen';
echo '<p>' . ' echo '<p>Brief of the Business / Service Model: '.$ov_value['business_brief'].'.</p>
Brief of the Business / Service Model: (Entered details about business in Free text field should appear here). <p>Visited address is of a '.$ov_value['visited_address_is'].'.</p>
Visited address is of a Godown/Office/Factory. <p>At the time of visit, the officer sighted '.$ov_value['no_of_employees_sighted_by_PD_officer_during_visit'].' employees at the business premises.</p>
At the time of visit, the officer sighted 10 employees at the business premises. <p>The Business Name board was .'.$company_name_sighted.'.at the visited address.</p>';
The Business Name board was seen/not seen at the visited address. if($ov_value['do_you_want_to_add_other_documents'] == 'Yes'){
(Name of business documents selected/Entered) was sighted during visit and pictures are enclosed with the Report. echo '<p>'.$ov_value['remarks_others'].'was sighted during visit and pictures are enclosed with the Report.</p>';
The Godown/Office/Factory is Rented/Owned. }
(If Not Disclosed is selected then), if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
The Godown/Office/Factory is Rented or Owned is Not Disclosed by the person met. echo '<p>The '.$ov_value['visited_address_is'].' is '.$ov_value['Visited_address_is_rented'].'.</p>';
Business Activity was seen/ was not seen and (Selected dropdowns or entered remarks) }
Stock was seen during visit and pictures are enclosed with the Report. if($ov_value['Visited_address_is_rented'] == 'not disclosed '){
(If No is selected then) echo '<p>The '.$ov_value['visited_address_is'].' is Rented or Owned is Not Disclosed by the person met.</p>';
Stock was not seen during visit because (Entered reason in remark).' . '</p>'; }
echo '<p>Business Activity was '.$company_name_sighted.' and '.$business_activities_during_visit.'</p>';
if($ov_value['stock_photograph'] == 'Yes'){
echo '<p>Stock was seen during visit and pictures are enclosed with the Report.</p>';
}
if($ov_value['stock_photograph'] == 'No'){
echo '<p>Stock was not seen during visit because '.$ov_value['reason_of_stock_non_availability'].' .</p>';
}
?> ?>
<div id="page_break"></div> <div id="page_break"></div>
<!-- ####################### office visit DI ends ############################--> <!-- ####################### office visit DI ends ############################-->
<!-- ################# neighbourhood/reference check #################--> <!-- ################# neighbourhood/reference check #################-->
<!-- <?php <?php
$existNeighRefCheck = array();
$pd_offiecer_status_about_neighbor = "";
foreach ($pd_processed_forms[19] as $rowKey => $nrcRow) {
$neighbourRefRow = json_decode($nrcRow['processed_json'], true);
//print_r($applicants_details);
//print_r($neighbourRefRow);die();
$neighbourhood_form_common_remarks = $neighbourRefRow['neighbour_reference_remark'];
if (strcasecmp($neighbourRefRow['neighbourhood_status'], 'could not verify')) {
$pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status'];
if (count($neighbourRefRow['neighbourhood_list']) > 0) {
$company_name = MYUTIL::findCompanyName($all_company_details, 1, 1);
$existNeighRefCheck = NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name, $neighbourRefRow['neighbourhood_list'], $pd_master_details[0], $applicants_details); //applicants_details comes from controller
}
}
// if(&& count($neighbourRefRow['referencecheck_list'])>0){
// $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]);
// }
}
?>
<h3 contenteditable="true">Neighbourhood / Reference Check</h3> $pd_offiecer_status_about_neighbor = "";
<?php $neighbour_details = json_decode($pd_processed_forms[29][0]['json'], true);
$neighbour_value = $neighbour_details['json'];
?>
<h3 contenteditable="true">Neighbourhood / Reference Check</h3>
<?php
//echo $pd_offiecer_status_about_neighbor; //echo $pd_offiecer_status_about_neighbor;
if (count($existNeighRefCheck) > 0) { if(count($neighbour_value)>0){
// print_r($existNeighRefCheck);die();
$neighbourhood_name='Neighbour Check was done with ';
$neighbourhood_name.= $neighbour_value['neighbourhood_name'].'.';
$neighbourhood_do_know = null;
$neighbourhood_business_running_yr = null;
$ownership = null;
$neighbourhood_name_only = $neighbour_value['neighbourhood_name'];
if(strtoupper($neighbour_value['do_know'])=='YES'){
$neighbourhood_do_know = $neighbour_value['neighbourhood_name']." knows about applicants and their business.";
} else if(strtoupper($neighbour_value['do_know'])=='NO'){
$neighbourhood_do_know = $neighbour_value['neighbourhood_name']." did not know about the applicant or their business.";
}
if($neighbour_value['how_long_do_know_in_year'] || $neighbour_value['how_long_do_know_in_month'])
{
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." confirmed that the business has been in operation for ";
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_year'] == 1) ? $neighbour_value['how_long_do_know_in_year']." year" : (($neighbour_value['how_long_do_know_in_year'] > 1) ? $neighbour_value['how_long_do_know_in_year']." years" : "");
$neighbour_value['how_long_do_know_in_year'] && $neighbour_value['how_long_do_know_in_month'] ? $neighbourhood_business_running_yr .= ' and ':'';
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_month'] == 1) ? $neighbour_value['how_long_do_know_in_month']." month" : (($neighbour_value['how_long_do_know_in_month'] > 1) ? $neighbour_value['how_long_do_know_in_month']." months" : "");
$neighbourhood_business_running_yr .= '.';
}
else
{
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." was not aware of how long the business is in operation.";
}
$ownwers_list = '';
if($neighbour_value['organisation_owner']){
foreach($neighbour_value['organisation_owner'] as $owner)
{
if($owner['id'] != 0)
{
$title = MYUTIL::applicantTitleName($applicants_details,$owner['id']);
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner['id'],$applicants_details).' , ';
}
else
{
$ownwers_list .= ' '.$neighbour_value['other_organisation_owner'].' , ';
}
}
//echo $ownwers_list;
//$ownwers_list = substr_replace($ownwers_list,'', strrpos(-$ownwers_list,','),1);
//echo $ownwers_list;
//echo $ownwers_list;echo "**********";
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
if(strrpos($ownwers_list,','))
{
$ownwers_list = substr_replace($ownwers_list,' and ', strrpos($ownwers_list,','),1);
}
$grammer1 = count($neighbour_value['organisation_owner']) > 1 ? ' are ': ' is ';
$grammer2 = count($neighbour_value['organisation_owner']) > 1 ? 'owners': 'owner';
$ownership = 'As per '.$neighbour_value['neighbourhood_name'].' the '.$grammer2 .' of '.$company_name.$grammer1.$ownwers_list.'.';
}else
{
$ownership = $neighbour_value['neighbourhood_name']." was not aware of the business ownership.";
}
$existNeighRefCheck = array('neighbourhood_name_only' => $neighbourhood_name_only,'neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership);
print_r($existNeighRefCheck);die();
?> ?>
<?php foreach ($existNeighRefCheck as $nkey => $nfValue) { <?php foreach($existNeighRefCheck as $nkey => $nfValue) {
echo $nfValue['neighbourhood_name_only']; echo $nfValue['neighbourhood_name_only'];
?> ?>
<ul> <ul>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li> <li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li> <li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li> <li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?> <li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?></li>
</ul> </ul>
<?php } ?> <?php }?>
<li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor; ?>.</span></li> <li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor;?>.</span></li>
</li> </li>
<?php <?php
} else { ?> }
else{?>
<!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> --> <!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> -->
<!-- <p>Neighbour Check was not possible due to Could not verify</p> -- <!-- <p>Neighbour Check was not possible due to Could not verify</p> -->
<p>Status of the check: could not verify.<p> <p>Status of the check: could not verify.</p>
<?php <?php
}
if ($neighbourhood_form_common_remarks != "") {
echo '<p>' . $neighbourhood_form_common_remarks . '</p>';
} }
if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
?> ?>
-->
<!-- ################# neighbourhood/reference check ends #################--> <!-- ################# neighbourhood/reference check ends #################-->
<!-- ################# credit manager specific query #################--> <!-- ################# credit manager specific query #################-->
<?php <?php
$credit_officier_specific_queries = array(); $credit_officier_specific_queries = array();
if (isset($pd_processed_forms[24])) { if (isset($pd_processed_forms[31])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[24][0]['processed_json'], true); $credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
} }
// echo 'CREDIT ********************';
// print_r($data['pd_processed_forms'][24]);
// print_r($data['pd_processed_forms'][24]);
// print_r($data['pd_processed_forms'][24]);
//print_r($credit_officier_specific_queries);
// if(count($credit_officier_specific_queries))
// {
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>'; echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>';
//echo '<br>';
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) { if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
@ -583,7 +619,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>'; echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>';
//
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) { if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
@ -621,10 +657,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
} }
//}
?> ?>
<!-- ################# credit manager specific query ends#################--> <!-- ################# credit manager specific query ends#################-->
<!-- ################# final remarks #################--> <!-- ################# final remarks #################-->