SMART PD REPORT 3

This commit is contained in:
Velz2020 2020-09-29 23:37:27 +05:30
parent b1357f7d15
commit 2d44b644be
5 changed files with 181 additions and 150 deletions

View File

@ -10378,7 +10378,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
public function updateVendorStatus_post()
{
$records = $this->post('records');
//print_r($records);
$fields_to_update = array('vendor_status' => $records['vendor_status'],'fk_updatedby' => $records['fk_updatedby']);
if(isset($records['vendor_pdofficer']))
@ -10389,16 +10389,44 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
// {
// $fields_to_update['start_location'] = $records['link'];
// }
if(isset($records['vendor_status']) && ($records['vendor_status'] == BOUNCED))
{
unset($records['bounce_reason']);
unset($records['bounce_reason_others']);
}
if(isset($records['vendor_status']) && $records['vendor_status'] == COMPLETED)
if(isset($records['vendor_status']) && ($records['vendor_status'] == COMPLETED || $records['vendor_status'] == QC_COMPLETED))
{
$vendor_form = $this->PD_Model->selectCustomRecords(array('json'),array('isactive' => 1,'fk_form_id' => 25,'fk_pd_id' => $records['pd_id'])
,PDFORMDETAILSJSON);
if(count($vendor_form))
{
$vendor_form = json_decode($vendor_form[0]['json'],true);
if(isset($vendor_form['is_form_validated']) && !$vendor_form['is_form_validated'])
{
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
$data['msg'] = 'Form Saved as Draft! Please Fill and submit the form';
$this->response($data,REST_Controller::HTTP_OK);
}
}
else
{
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
$data['msg'] = 'Form Not filled !';
$this->response($data,REST_Controller::HTTP_OK);
}
// print_r($vendor_form);
if($records['vendor_status'] == COMPLETED)
{
$fields_to_update['pd_visit_date'] = date('Y-m-d H:i:s');
if(isset($records['is_form_validated']))
{
$fields_to_update['is_video_merged'] = $records['is_form_validated'];
unset($records['is_form_validated']);
}
}
// die();
$id = $this->PD_Model->updateRecords($fields_to_update,PDTRIGGER,array('pd_id' => $records['pd_id']));
if($id)

View File

@ -7,16 +7,16 @@ class vendor_form
{
$CI =&get_instance();
$CI->load->model('PD_Model');
$return_data = 'During FI visit, No one met at the visited premises.';
$return_data = 'During Field Visit, No one met at the visited premises.';
if($cus_type == 2)
{
$return_data .= 'FI officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.';
$return_data .= 'Field Visit officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.';
}
if($vendor_gen_section['person_met_entered'])
{
$return_data = ($cus_type == 1 ? $vendor_gen_section['person_met_entered']." ".$vendor_gen_section['designation_entered'] ." met at the visited address during FI." : $vendor_gen_section['person_met_entered']. " met at the visited address during FI.");
$return_data = ($cus_type == 1 ? $vendor_gen_section['person_met_entered']." ( ".$vendor_gen_section['designation_entered'] ." ) met at the visited address during Field Visit." : $vendor_gen_section['person_met_entered']. " met at the visited address during Field Visit.");
}
else
{
@ -24,7 +24,7 @@ class vendor_form
{
if($ind_value['is_person_met'])
{
$return_data = "Applicant ".$ind_value['applicant_name']." was met at the visited address during FI.";
$return_data = "Applicant ".$ind_value['applicant_name']." was met at the visited address during Field Visit.";
break;
}
}

View File

@ -24,14 +24,15 @@ class Common_Masters_Model extends SPARQ_Model {
if($table_constant == 'PDLOCATIONAPPROACH' || $table_constant == 'PDOFFICERRECOMMENDATIONS')
{
$order = $master_tables_pkid[$table_constant];
$master_data = $this->db->SELECT('*')->FROM(constant($table_constant))->ORDER_BY('is_others')->ORDER_BY($order)->GET()->result_array();
$master_data = $this->db->SELECT('*')->FROM(constant($table_constant))->WHERE('isactive',1)->ORDER_BY('is_others')->ORDER_BY($order)->GET()->result_array();
return $master_data;
}
else
{
$order = $master_tables_field_names[$table_constant];
$master_data = $this->db->SELECT('*')->FROM(constant($table_constant))->ORDER_BY('is_others')->ORDER_BY($order)->GET()->result_array();
$master_data = $this->db->SELECT('*')->FROM(constant($table_constant))->WHERE('isactive',1)->ORDER_BY('is_others')->ORDER_BY($order)->GET()->result_array();
//echo count($master_data);die();
return $master_data;
}
// print_r($this->db->last_query());

View File

@ -4762,31 +4762,32 @@ if($total_no_of_business > 0) {
<!-- ######################### VENDOR SECTION START ###########################-->
<!-- ######################### VENDOR SECTION START ###########################-->
<?php
$vendor_form_json = json_decode($pd_processed_forms[25][0]['json'],true);
echo "<h2><center>Vendor FI Report of $main_applicant_name</center></h2>";
echo '<p><b>General Section</b></p>';
echo '<div id="page_break"></div>';
$vendor_form_json = json_decode($pd_processed_forms[25][0]['json'],true);
echo "<h2><center> Field Visit Report of $main_applicant_name</center></h2>";
echo '<h2>General Section</h2>';
$vendor_gen_section_text = vendor_form::getVendorGeneralSectionContent($vendor_form_json['questions'][0]);
echo "<p>$vendor_gen_section_text</p>";
echo "<p style='text-align:justify;'>$vendor_gen_section_text</p>";
echo '<p><b>Address Section</b></p>';
echo '<h3>Address Section</h3>';
$vendor_address_section = $vendor_form_json['questions'][1];
$address_content = vendor_form::getVendoraddressSectionContent($vendor_address_section);
echo "<p>FI Initiated Address: ".$vendor_address_section['address'].", ". $address_content['initiated_address']['city_name'] .", ".$address_content['initiated_address']['state_name']." - ".$address_content['initiated_address']['pincode']." </p>";
echo "<p>Field Visit Initiated Address: ".$vendor_address_section['address'].", ". $address_content['initiated_address']['city_name'] .", ".$address_content['initiated_address']['state_name']." - ".$address_content['initiated_address']['pincode']." </p>";
if(!$vendor_address_section['is_pd_done_on_initiated_address'])
{
echo "<p>FI Actual Visited Address: ".$vendor_address_section['alternative_addresses'][0]['alternative_address'].", ". $address_content['actual_address']['city_name'] .", ".$address_content['actual_address']['state_name']." - ".$address_content['actual_address']['pincode']." </p>";
echo "<p>Field Visit Actual Visited Address: ".$vendor_address_section['alternative_addresses'][0]['alternative_address'].", ". $address_content['actual_address']['city_name'] .", ".$address_content['actual_address']['state_name']." - ".$address_content['actual_address']['pincode']." </p>";
echo "<p>Reasaon: ".$vendor_address_section['alternative_addresses'][0]['reason_for_alternative_address']."</p>";
}
$locality = preg_match("/^[aeiouAEIOU]/U", $address_content['comment_locality']) ? 'an '.$address_content['comment_locality'] : 'a '.$address_content['comment_locality'];
echo "<p>The FI visit was done at ".$address_content['address_type']." of the loan applicants. The ".$address_content['address_type']." is located in a ".$address_content['address_locality']." and the estimated area of the ".$address_content['address_type']." is ".$vendor_address_section['estimated_area']." ". $address_content['uom'].". The PD location was ".$address_content['pd_location_approach'].". As Per FI Officer, the ".$address_content['address_type']." is situated in $locality Locality.</p>";
echo "<p style='text-align:justify;'>The Field Visit was done at <b>".$address_content['address_type']."</b> of the loan applicants. The ".$address_content['address_type']." is located in a <b>".$address_content['address_locality']."</b> and the estimated area of the <b>".$address_content['address_type']."</b> is <b>".$vendor_address_section['estimated_area']." ". $address_content['uom']."</b>. The location was <b>".$address_content['pd_location_approach']."</b>. As Per Officer, the ".$address_content['address_type']." is situated in <b>$locality Locality</b>.</p>";
echo '<p><b>Busienss information</b></p>';
echo '<h3>Business information</h3>';
$vendor_business_info = $vendor_form_json['questions'][2]['business_group'][0];
echo $emp = $vendor_business_info['officer_total'] > 0 ? "<p>At the time of FI visit, ".$vendor_business_info['officer_total']." employees sighted at the visited premises.</p>" : "<p>At the time of FI visit, no employees sighted at the visited premises.</p>";
echo $emp = $vendor_business_info['officer_total'] > 0 ? "<p>At the time of Field Visit , <b>".$vendor_business_info['officer_total']." </b>employees sighted at the visited premises.</p>" : "<p>At the time of Field Visit visit, no employees sighted at the visited premises.</p>";
echo $name_board = $vendor_business_info['was_the_company_name_board_sighted'] == 'yes' ? "<p>The Business Name board was seen at the visited premises.</p>" : "<p>The Business Name board was not seen at the visited premises.</p>";
echo $name_board = $vendor_business_info['was_the_company_name_board_sighted'] == 'yes' ? "<p>The Business <b>Name board was seen</b> at the visited premises.</p>" : "<p>The Business <b>Name board was not seen</b> at the visited premises.</p>";
if(($vendor_business_info['documents_sighted'] == 'yes'))
{
@ -4796,25 +4797,26 @@ if($total_no_of_business > 0) {
{
$doc_names .= $photo_names [ $doc_value['document_name'] ].', ';
}
$were = count($vendor_business_info['documents_info']) == 1 ? 'was' : 'were';
$doc_names = substr_replace($doc_names,' ',-2);
echo "$doc_names were sighted during FI visit and photographs available in zipped file enclosed with report.";
echo "<p style='text-align:justify;'>$doc_names $were sighted during Field Visit visit and photographs available in zipped file enclosed with report.</p>";
}
else
{
echo '<p>No Documents were sighted during FI visit.</p>';
echo '<p>No Documents were sighted during Field Visit visit.</p>';
}
$vendor_business_asset_info = $vendor_form_json['questions'][2]['business_group'][1];
echo $vendor_business_asset_info['business_is_pd_visited'] == 'yes' ? '<p>Business Activity was seen during FI visit</p>': '<p>Business Activity was not seen during FI visit.</p>';
echo $vendor_business_asset_info['business_is_pd_visited'] == 'yes' ? '<p><b>Business Activity was seen</b> during Field visit</p>': '<p><b>Business Activity was not seen</b> during Field Visit visit.</p>';
$vendor_stock_info = $vendor_form_json['questions'][2]['business_group'][2];
echo $vendor_stock_info['is_stock_photo'] == 'yes' ? '<p>Stock was observed during FI visit and photographs available in zipped file enclosed with report.</p>': '<p>No Stock was observed during FI visit.</p>';
echo $vendor_stock_info['is_stock_photo'] == 'yes' ? '<p><b>Stock was observed</b> during Field visit and photographs available in zipped file enclosed with report.</p>': '<p>No Stock was observed during Field Visit visit.</p>';
echo $vendor_business_asset_info['business_asset_sight'] == 'yes' ? '<p>Business Assets were sighted during FI visit and photographs available in zipped file enclosed with report.</p>': '<p>No Business Assets were sighted during FI visit.</p>';
echo '<p><b>Credit Manager Special Requests:</b></p></br>';
echo $vendor_business_asset_info['business_asset_sight'] == 'yes' ? '<p>Business Assets were sighted during Field visit and photographs available in zipped file enclosed with report.</p>': '<p>No Business Assets were sighted during Field Visit visit.</p>';
echo "<p>During Field visit, officer clicked office/Name board/Entrance photographs and same is available in
zipped folder attached with report.</p>";
echo '<h3>Credit Manager Special Requests:</h3></br>';
$vendor_credit_manager_info = $vendor_form_json['questions'][6];
if(count($vendor_credit_manager_info['docs_to_be_sighted']))
{
@ -4822,12 +4824,12 @@ if($total_no_of_business > 0) {
{
echo '<b>Document Required:</b>'.$cm_value['placeholder'].'<br>';
echo '<b>Provided (Yes / No):</b>'.ucfirst($cm_value[ $cm_value['control_name'] ] );
echo $cm_value['reason'] ? '<br><b>Reason:</b>'.$cm_value['reason'] : '';
echo isset($cm_value['reason']) ? '<br><b>Reason:</b>'.$cm_value['reason'] : '';
}
}
echo '<p><b>Neighbourhood Check Details</b></p></br>';
echo '<h3>Neighbourhood Check Details</h3></br>';
$vendor_neighbour = $vendor_form_json['questions'][3];
$existNeighRefCheck=array();
@ -4887,15 +4889,15 @@ if($total_no_of_business > 0) {
<!-- #################end neighbourhood/reference check #################-->
<?php
echo '<p><b>Submit:</b></p>';
// echo '<h3>Submit:</h3>';
$vendoe_final_remars = $vendor_form_json['questions'][5];
echo '<p><b>Final Status of FI visit:</b>'. $vendoe_final_remars['final_visit_status'] .'</p>';
echo '<p><b>Comments Entered:</b>'. $vendoe_final_remars['final_comments'] .'</p>';
echo '<p><b>Final Status of Field Visit:</b>'. $vendoe_final_remars['final_visit_status'] .'</b></p>';
echo '<p><b>Remarks:</b>'. $vendoe_final_remars['final_comments'] .'</p>';
echo '<br><br><br>';
echo '<p><b>Name of the FI Officer visited:</b>'.$pd_master_details[0]['vendor_pdofficer_name'].'</p>';
echo '<p><b>Name of the FI Agency visited:</b>'.$pd_master_details[0]['agency_name'].'</p>';
echo '<p><b>Date & Time of FI visit:</b>'.$pd_master_details[0]['pd_visit_date'].'</p>';
echo '<p><b>Name of the Officer visited:</b>'.$pd_master_details[0]['vendor_pdofficer_name'].'</p>';
echo '<p><b>Name of the Agency visited:</b>'.$pd_master_details[0]['agency_name'].'</p>';
echo '<p><b>Date & Time of visit:</b>'.$pd_master_details[0]['pd_visit_date'].'</p>';
echo '<div><img style="width:100px;height:50px;opacity: 0.5;" src="https://apitest.pdgenie.com/sparqtest/api/vs.jpg"/></div>';

View File

@ -552,121 +552,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p align="justify"><i><strong>Registered / Corporate Office:</strong> SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002</i></p>';
?>
<!-- ######################### VENDOR SECTION START ###########################-->
<!-- ######################### VENDOR SECTION START ###########################-->
<?php
$vendor_form_json = json_decode($pd_processed_forms[25][0]['json'],true);
echo "<h2><center>Vendor FI Report of $main_applicant_name</center></h2>";
echo '<p><b>General Section</b></p>';
$vendor_gen_section_text = vendor_form::getVendorGeneralSectionContent($vendor_form_json['questions'][0],2);
echo "<p>$vendor_gen_section_text</p>";
echo '<p><b>Employer information</b></p>';
$vendor_employer_info = $vendor_form_json['questions'][2];
if(array_key_exists('employer_details',$vendor_employer_info))
{
$employer_details = $vendor_employer_info['employer_details'];
$vendor_emp_master = vendor_form::getVendorEmpSectionContent($vendor_employer_info);
echo '<p>During FI visit,'. $employer_details['name_person_met'] .' '.substr_replace($vendor_emp_master,'',-3) .'was met at the visited premises.</p>';
echo '<p>Employers/Managers Company ID card / Visiting Card was photographed during FI visit.</p>';
echo '<p>Salary amount was confirmed by person met during FI visit. Applicant gets monthly gross salary of ₹ '.$employer_details['gross_monthly_salary'].' and net monthly salary of ₹'.$employer_details['net_monthly_salary'].'.</p>';
echo '<p>Salary paid to the applicant between '.$employer_details['from_date_the_salary_is_rcv'].' to ' .$employer_details['to_date_the_salary_is_rcv'].' of every month via '.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.</p>';
$time = $employer_details['how_long_year'].' year(s)'; $time .= ($employer_details['how_long_year'] ? ' and '.$employer_details['how_long_year'] .' month(s)': '');
echo '<p>During FI visit, Employer confirmed that the applicant has served '.$time.' an employee in this firm / company.</p>';
}
else
{
echo '<p>During FI visit, employer/manager was not met at the visited premises.</p>';
echo '<p>Employers/Managers Company ID card / Visiting Card was not photographed during FI visit.</p>';
echo '<p>Salary amount was not confirmed</p>';
}
if(isset($vendor_employer_info['docs_sighted']))
{
//print_r($vendor_employer_info['docs_sighted']['sal_reg_seen'] == 'yes' ? 'Salary Register': '');die();
echo '<p><b>Documents Sighted of applicant employment During FI:</b></p>';
$document_name = '';
$document_name .= ($vendor_employer_info['docs_sighted']['sal_reg_seen'] == 'yes' ? 'Salary Register, ': '');
$document_name .= ($vendor_employer_info['docs_sighted']['attendance_seen'] == 'yes' ? 'Attendance Register, ' : '');
$document_name .= ($vendor_employer_info['docs_sighted']['cash_voucher'] == 'yes'? 'Cash Vouche, r' : '');
$document_name .= ($vendor_employer_info['docs_sighted']['sal_certificate'] == 'yes' ? 'Salary Certificate, ' : '');
$document_name .= ($vendor_employer_info['docs_sighted']['sal_slip'] == 'yes' ? 'Salary Slip, ': '');
$document_name .= ($vendor_employer_info['docs_sighted']['other_doc'] == 'yes' ? $vendor_employer_info['docs_sighted']['other_doc_name'].', ' : '');
if($document_name != '')
{
$document_name = substr_replace($document_name,'', -2);
echo "<p> $document_name was seen during FI visit and photographs of same is available in zipped file enclosed with report.</p>";
}
else
{
echo '<p>Applicants employment documents were not seen during FI visit because (reason entered).</p>';
}
}
$vendor_credit_manager_info = $vendor_form_json['questions'][6];
if(count($vendor_credit_manager_info['docs_to_be_sighted']))
{
echo '<p><b>Credit Manager Special Requests:</b></p></br>';
foreach ($vendor_credit_manager_info['docs_to_be_sighted'] as $cm_key => $cm_value)
{
echo '<b>Document Required:</b>'.$cm_value['placeholder'].'<br>';
echo '<b>Provided (Yes / No):</b>'.ucfirst($cm_value[ $cm_value['control_name'] ] );
echo isset($cm_value['reason']) ? '<br><b>Reason:</b>'.$cm_value['reason'] : '';
}
}
echo '<p><b>Address Section</b></p>';
$vendor_address_section = $vendor_form_json['questions'][1];
$address_content = vendor_form::getVendoraddressSectionContent($vendor_address_section);
echo "<p>FI Initiated Address: ".$vendor_address_section['address'].", ". $address_content['initiated_address']['city_name'] .", ".$address_content['initiated_address']['state_name']." - ".$address_content['initiated_address']['pincode']." </p>";
if(!$vendor_address_section['is_pd_done_on_initiated_address'])
{
echo "<p>FI Actual Visited Address: ".$vendor_address_section['alternative_addresses'][0]['alternative_address'].", ". $address_content['actual_address']['city_name'] .", ".$address_content['actual_address']['state_name']." - ".$address_content['actual_address']['pincode']." </p>";
echo "<p>Reasaon: ".$vendor_address_section['alternative_addresses'][0]['reason_for_alternative_address']."</p>";
}
$locality = preg_match("/^[aeiouAEIOU]/U", $address_content['comment_locality']) ? 'an '.$address_content['comment_locality'] : 'a '.$address_content['comment_locality'];
echo "<p>The FI visit was done at ".$address_content['address_type']." of the loan applicants. The ".$address_content['address_type']." is located in a ".$address_content['address_locality'].". The PD location was ".$address_content['pd_location_approach'].". As Per FI Officer, the ".$address_content['address_type']." is situated in $locality Locality.</p>";
echo '<p><b>Submit:</b></p>';
$vendoe_final_remars = $vendor_form_json['questions'][5];
echo '<p><b>Final Status of FI visit:</b>'. $vendoe_final_remars['final_visit_status'] .'</p>';
echo '<p><b>Comments Entered:</b>'. $vendoe_final_remars['final_comments'] .'</p>';
echo '<p><b> Neighbourhood check:</b></p>';
echo '<p><b>Existence of organization/office confirmed by neighbour:</b>'. ucfirst($vendoe_final_remars['company_existence_neighbour_confirmed']) .'</p>';
if($vendoe_final_remars['company_existence_neighbour_confirmed'] == 'yes')
{
$time = '<p>Existence of organization/office confirmed by neighbour and is in existence for '.$vendoe_final_remars['company_existence_years'].' year(s).</p>';
$time .= ( $vendoe_final_remars['company_existence_months'] ? $vendoe_final_remars['company_existence_months'].' month(s)' : '');
echo $time;
}
echo '<br><br><br>';
echo '<p><b>Name of the FI Officer visited:</b>'.$pd_master_details[0]['vendor_pdofficer_name'].'</p>';
echo '<p><b>Name of the FI Agency visited:</b>'.$pd_master_details[0]['agency_name'].'</p>';
echo '<p><b>Date & Time of FI visit:</b>'.$pd_master_details[0]['pd_visit_date'].'</p>';
echo '<div><img style="width:100px;height:50px;opacity: 0.5;" src="https://apitest.pdgenie.com/sparqtest/api/vs.jpg"/></div>';
?>
<!-- ######################### VENDOR SECTION END ###########################-->
<!-- ######################### VENDOR SECTION END ###########################-->
<!-- GENERAL INFORMATIN -->
<?php
die();
//die();
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
$total_no_of_business = count($general_form['companies']);
$persons_met = "Default";
@ -2120,7 +2010,117 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '</tbody></table>';
}
?>
<!-- ######################### VENDOR SECTION START ###########################-->
<!-- ######################### VENDOR SECTION START ###########################-->
<?php
echo '<div id="page_break"></div>';
$vendor_form_json = json_decode($pd_processed_forms[25][0]['json'],true);
echo "<h2><center>Field Visit Report of $main_applicant_name</center></h2>";
echo '<h2>General Section</h2>';
$vendor_gen_section_text = vendor_form::getVendorGeneralSectionContent($vendor_form_json['questions'][0],2);
echo "<p>$vendor_gen_section_text</p>";
echo '<p><b>Employer information</b></p>';
$vendor_employer_info = $vendor_form_json['questions'][2];
if(array_key_exists('employer_details',$vendor_employer_info))
{
$employer_details = $vendor_employer_info['employer_details'];
$vendor_emp_master = vendor_form::getVendorEmpSectionContent($vendor_employer_info);
echo '<p>During Field visit,'. $employer_details['name_person_met'] .' ( '.substr_replace($vendor_emp_master,'',-3) .' ) was met at the visited premises.</p>';
echo '<p>Employers/Managers Company ID card / Visiting Card was photographed during Field Visit visit.</p>';
echo '<p>Salary amount was confirmed by person met during Field Visit visit. Applicant gets monthly gross salary of <b>₹ '.$employer_details['gross_monthly_salary'].'</b> and net monthly salary of <b>₹'.$employer_details['net_monthly_salary'].'</b>.</p>';
echo '<p>Salary paid to the applicant between <b>'. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).'</b> of every month via <b>'.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.</b></p>';
$time = $employer_details['how_long_year'].' year(s)'; $time .= ($employer_details['how_long_year'] ? ' and '.$employer_details['how_long_year'] .' month(s)': '');
echo '<p>During Field Visit, Employer confirmed that the applicant has served <b>'.$time.'</b> an employee in this firm / company.</p>';
}
else
{
echo '<p>During Field visit, employer/manager was not met at the visited premises.</p>';
echo '<p>Employers/Managers Company ID card / Visiting Card was not photographed during Field visit.</p>';
echo '<p>Salary amount was not confirmed</p>';
}
if(isset($vendor_employer_info['docs_sighted']))
{
//print_r($vendor_employer_info['docs_sighted']['sal_reg_seen'] == 'yes' ? 'Salary Register': '');die();
echo '<p><b>Documents Sighted of applicant employment During Field:</b></p>';
$document_name = '';
$document_name .= ($vendor_employer_info['docs_sighted']['sal_reg_seen'] == 'yes' ? 'Salary Register, ': '');
$document_name .= ($vendor_employer_info['docs_sighted']['attendance_seen'] == 'yes' ? 'Attendance Register, ' : '');
$document_name .= ($vendor_employer_info['docs_sighted']['cash_voucher'] == 'yes'? 'Cash Vouche, r' : '');
$document_name .= ($vendor_employer_info['docs_sighted']['sal_certificate'] == 'yes' ? 'Salary Certificate, ' : '');
$document_name .= ($vendor_employer_info['docs_sighted']['sal_slip'] == 'yes' ? 'Salary Slip, ': '');
$document_name .= ($vendor_employer_info['docs_sighted']['other_doc'] == 'yes' ? $vendor_employer_info['docs_sighted']['other_doc_name'].', ' : '');
if($document_name != '')
{
$document_name = substr_replace($document_name,'', -2);
echo "<p> $document_name were seen during Field visit and photographs of same is available in zipped file enclosed with report.</p>";
}
else
{
echo '<p>Applicants employment documents were not seen during Field visit because (reason entered).</p>';
}
}
$vendor_credit_manager_info = $vendor_form_json['questions'][6];
if(count($vendor_credit_manager_info['docs_to_be_sighted']))
{
echo '<p><b>Credit Manager Special Requests:</b></p></br>';
foreach ($vendor_credit_manager_info['docs_to_be_sighted'] as $cm_key => $cm_value)
{
echo '<b>Document Required:</b>'.$cm_value['placeholder'].'<br>';
echo '<b>Provided (Yes / No):</b>'.ucfirst($cm_value[ $cm_value['control_name'] ] );
echo isset($cm_value['reason']) ? '<br><b>Reason:</b>'.$cm_value['reason'] : '';
}
}
echo '<h3>Address Section</h3>';
$vendor_address_section = $vendor_form_json['questions'][1];
$address_content = vendor_form::getVendoraddressSectionContent($vendor_address_section,2);
echo "<p>Field Visit Initiated Address: ".$vendor_address_section['address'].", ". $address_content['initiated_address']['city_name'] .", ".$address_content['initiated_address']['state_name']." - ".$address_content['initiated_address']['pincode']." </p>";
if(!$vendor_address_section['is_pd_done_on_initiated_address'])
{
echo "<p>Field Visit Actual Visited Address: ".$vendor_address_section['alternative_addresses'][0]['alternative_address'].", ". $address_content['actual_address']['city_name'] .", ".$address_content['actual_address']['state_name']." - ".$address_content['actual_address']['pincode']." </p>";
echo "<p>Reasaon: ".$vendor_address_section['alternative_addresses'][0]['reason_for_alternative_address']."</p>";
}
$locality = preg_match("/^[aeiouAEIOU]/U", $address_content['comment_locality']) ? 'an '.$address_content['comment_locality'] : 'a '.$address_content['comment_locality'];
echo "<p style='text-align:justify;'>The Field Visit was done at <b>".$address_content['address_type']."</b> of the loan applicants. The ".$address_content['address_type']." is located in a <b>".$address_content['address_locality']."</b>.The location was <b>".$address_content['pd_location_approach']."</b>. As Per Officer, the ".$address_content['address_type']." is situated in <b>$locality Locality</b>.</p>";
// echo '<p><b>Submit:</b></p>';
$vendoe_final_remars = $vendor_form_json['questions'][5];
echo '<p><b>Final Status of Field visit:'. $vendoe_final_remars['final_visit_status'] .'</b></p>';
echo '<p><b>Remarks:</b>'. $vendoe_final_remars['final_comments'] .'</p>';
echo '<p><b> Neighbourhood check:</b></p>';
echo '<p><b>Existence of organization/office confirmed by neighbour:</b>'. ucfirst($vendoe_final_remars['company_existence_neighbour_confirmed']) .'</p>';
if($vendoe_final_remars['company_existence_neighbour_confirmed'] == 'yes')
{
$time = '<p>Existence of organization/office confirmed by neighbour and is in existence for '.$vendoe_final_remars['company_existence_years'].' year(s).</p>';
$time .= ( $vendoe_final_remars['company_existence_months'] ? $vendoe_final_remars['company_existence_months'].' month(s)' : '');
echo $time;
}
echo '<br><br><br>';
echo '<p><b>Name of the Officer visited:</b>'.$pd_master_details[0]['vendor_pdofficer_name'].'</p>';
echo '<p><b>Name of the Agency visited:</b>'.$pd_master_details[0]['agency_name'].'</p>';
echo '<p><b>Date & Time of visit:</b>'.$pd_master_details[0]['pd_visit_date'].'</p>';
echo '<div><img style="width:100px;height:50px;opacity: 0.5;" src="https://apitest.pdgenie.com/sparqtest/api/vs.jpg"/></div>';
?>
<!-- ######################### VENDOR SECTION END ###########################-->
<!-- ######################### VENDOR SECTION END ###########################-->
<?php
// ########################### End disclaimer start #########################################
echo "<p>";