FI PD report DI case : ps
This commit is contained in:
parent
91785cb4d2
commit
ebfb737ead
@ -2709,7 +2709,27 @@ class PD_Controller extends REST_Controller
|
||||
$records['docs_to_be_sighted'] = isset($processed_json['docs_to_be_sighted']) ? $processed_json['docs_to_be_sighted'] : null;
|
||||
unset($processed_json['docs_to_be_sighted']);
|
||||
|
||||
case 27: case 28: case 29: case 30: case 31: case 32: case 33:
|
||||
case 27:
|
||||
foreach ($records as $key => $value){
|
||||
if(isset($value['Designation_of_Person_met']) && $value['Designation_of_Person_met'] != "")
|
||||
{
|
||||
$cr = $this->PD_Model->selectCustomRecords(array('*'),array('company_relationship_id' =>$value['Designation_of_Person_met'] ),COMPANYRELATIONSHIPS);
|
||||
if($cr)
|
||||
{
|
||||
$records[$key]['designation_person_met_master'] = $cr[0]['name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$processed_json = $records;
|
||||
break;
|
||||
case 28:
|
||||
$processed_json = GETPROCESSEDJSON::convertFIAddressForm($records, $formid);
|
||||
break;
|
||||
case 29:
|
||||
case 30:
|
||||
case 31:
|
||||
case 32:
|
||||
case 33:
|
||||
$processed_json = $records;
|
||||
break;
|
||||
case 34:
|
||||
@ -4704,6 +4724,16 @@ class PD_Controller extends REST_Controller
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_TELE_PD', $data, true);
|
||||
}
|
||||
}
|
||||
else if ($data['pd_master_details'][0]['fk_pd_type'] == 4) //FI PD
|
||||
{
|
||||
if ($data['pd_master_details'][0]['fk_fi_type_id'] == 1 ){
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT_FI_OV_DI', $data, true);
|
||||
} else if ($data['pd_master_details'][0]['fk_fi_type_id'] == 2 ){
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT_FI_OV_SAL', $data, true);
|
||||
} else if ($data['pd_master_details'][0]['fk_fi_type_id'] == 3 ){
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT_FI_RV', $data, true);
|
||||
}
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
@ -10658,7 +10688,7 @@ class PD_Controller extends REST_Controller
|
||||
$sourcefile = imagejpeg($image, $destination_path.$dbfile, '70');
|
||||
// die();
|
||||
// imagedestroy($image);
|
||||
// $sourcefile = $destination_path.$file;
|
||||
$sourcefile = $destination_path.$dbfile;
|
||||
// $sourcefile = imagejpeg($destination_path.$file, $destination_path.$dbfile,'70');
|
||||
$bucket_data = array('bucket_name' => $bucketname, 'key' => $key, 'sourcefile' => $sourcefile);
|
||||
$s3result = $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
|
||||
@ -2712,8 +2712,282 @@ class GETPROCESSEDJSON
|
||||
return $records;
|
||||
}
|
||||
/************************########### END OF EMPLOYMENT FORM #################****************************/
|
||||
/*****************########## FI-ADDRESS FORM DETAILS ##########********************/
|
||||
|
||||
public static function convertFIAddressForm($raw_json,$formid)
|
||||
{
|
||||
//echo "ADDRESS FORM CALLED";
|
||||
$CI =& get_instance();
|
||||
$master_tables_field_names = $CI->config->item('master_tables_field_names');
|
||||
$master_tables_pkid = $CI->config->item('master_tables_pkid');
|
||||
|
||||
$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);
|
||||
|
||||
|
||||
//print_r($raw_json);
|
||||
foreach($raw_json['json'] as $raw_json_key => $address)
|
||||
{
|
||||
|
||||
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);
|
||||
$CI->db->SELECT( $master_tables_field_names['STATE'] );
|
||||
$CI->db->FROM(STATE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['STATE'] ,$address['state']);
|
||||
$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]['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('city',$address))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['CITY'] );
|
||||
$CI->db->FROM(CITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['CITY'] ,$address['city']);
|
||||
$city= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($city))
|
||||
{
|
||||
$raw_json['json'][$raw_json_key]['city_master'] = $city[0][$master_tables_field_names['CITY']];
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('pincode',$address))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['PINCODE'] );
|
||||
$CI->db->FROM(PINCODE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['PINCODE'] ,$address['pincode']);
|
||||
$pincode= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($pincode))
|
||||
{
|
||||
$raw_json['json'][$raw_json_key]['pincode_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']];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($raw_json['json']['is_pd_done_on_initiated_address']) && ($raw_json['json']['is_pd_done_on_initiated_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);
|
||||
$CI->db->SELECT( $master_tables_field_names['STATE'] );
|
||||
$CI->db->FROM(STATE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['STATE'] ,$address['state']);
|
||||
$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]['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('city',$address))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['CITY'] );
|
||||
$CI->db->FROM(CITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['CITY'] ,$address['city']);
|
||||
$city= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($city))
|
||||
{
|
||||
$raw_json['json'][$raw_json_key]['city_master'] = $city[0][$master_tables_field_names['CITY']];
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('pincode',$address))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['PINCODE'] );
|
||||
$CI->db->FROM(PINCODE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['PINCODE'] ,$address['pincode']);
|
||||
$pincode= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($pincode))
|
||||
{
|
||||
$raw_json['json'][$raw_json_key]['pincode_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);
|
||||
|
||||
}
|
||||
/*****************########## END OF FI-ADDRESS FORM DETAILS ##########**************/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -417,19 +417,20 @@ defined('BASEPATH') or exit('No direct script access allowed');
|
||||
echo '<h3 contenteditable="true">General Information: </h3>';
|
||||
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
|
||||
$all_applicant_details = $applicants_details;
|
||||
foreach ($general_form as $key => $value)
|
||||
{
|
||||
?>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
if (1) {
|
||||
echo '<p>' . 'Applicant (Prajapati Ranjanaben) was met at the visited address.' . '</p>';
|
||||
} else if (0) {
|
||||
echo '<p>' . '(Prajapati Ranjanaben) (MBBS) was met at the visited address during visit..' . '</p>';
|
||||
}
|
||||
if ($general_form['general_remark'] != "") {
|
||||
echo '<p>' . $general_form['general_remark'] . '</p>';
|
||||
}
|
||||
?>
|
||||
` <?php
|
||||
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') {
|
||||
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 ############################-->
|
||||
|
||||
<!-- ####################### address details ############################-->
|
||||
@ -437,24 +438,31 @@ defined('BASEPATH') or exit('No direct script access allowed');
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true">Address Details: </h3>';
|
||||
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
|
||||
print_r($address_form);
|
||||
|
||||
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'], true);
|
||||
|
||||
|
||||
|
||||
$address_images = $pd_images[5];
|
||||
echo '<p>' . 'If Yes is selected in “Is this address where Visit is being done?” then,
|
||||
|
||||
Visit Initiated Address: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445
|
||||
|
||||
If No is selected in “Is this address where visit is being done?” then,
|
||||
|
||||
Address Where Visit is Initiated: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445
|
||||
Address Where Visit was actually done: C-68, Hemant Vallabh Park, Vatva Ahemadabad-382445
|
||||
foreach ($address_form as $key => $value)
|
||||
{
|
||||
if ($value['is_pd_done_on_initiated_address'] == 'yes') {
|
||||
echo '<p>' . '
|
||||
Visit Initiated Address: '.$value['initiated_address'].' , '.$value['city_master'].' , '.$value['state_master'].' , '.$value['pincode_master'].'. </p>';
|
||||
}
|
||||
if ($value['is_pd_done_on_initiated_address'] == 'no') {
|
||||
echo '<p>' . '
|
||||
Address Where Visit is Initiated: '.$value['initiated_address'].' , '.$value['city_master'].' , '.$value['state_master'].' , '.$value['pincode_master'].'.
|
||||
Address Where Visit was actually done: '.$value['initiated_address'].' , '.$value['city_master'].' , '.$value['state_master'].' , '.$value['pincode_master'].'.
|
||||
Reason for change in Visit address: (Entered reason for change in address should appear here).
|
||||
|
||||
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>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### address details ends ############################-->
|
||||
|
||||
<!-- ####################### office visit DI ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user