VENDOR VISIT OFFLINE FLAG

This commit is contained in:
Velz2020 2020-10-20 19:05:51 +05:30
parent a8c7186b83
commit 6570cda903
5 changed files with 122 additions and 60 deletions

View File

@ -944,7 +944,7 @@ class PD_Controller extends REST_Controller {
}
// die();
if(isset($pd_details['pd_status']) && ($pd_details['pd_status'] == COMPLETED) || ($pd_details['pd_status'] == ADD_ON_PENDING) )
if(isset($pd_details['pd_status']) && (($pd_details['pd_status'] == COMPLETED) || ($pd_details['pd_status'] == ADD_ON_PENDING)) )
{
if(array_key_exists('link',$pd_details))
@ -995,7 +995,7 @@ class PD_Controller extends REST_Controller {
//print_r($pd_details);
}
//die();
if($pd_details['pd_status'] == QC_COMPLETED)
if((isset($pd_details['pd_status']) && $pd_details['pd_status'] == QC_COMPLETED))
{
$pd_details['is_cus_link_disabled'] = 1;
}
@ -1041,7 +1041,7 @@ class PD_Controller extends REST_Controller {
$where_condition_array = array('pd_id' => $pd_details['pd_id'],'random_string' => $pd_details['random_string']);
$pd_id_modified = $this->PD_Model->updateRecords($pd_details,PDTRIGGER,$where_condition_array);
//print_r($pd_details);
// print_r($this->db->last_query());
//Update Address table,if primary address choosed
if($primary_address_id != null)
@ -1057,9 +1057,9 @@ class PD_Controller extends REST_Controller {
if($pd_id_modified != null || $pd_id_modified != '' && $count != 0)
{
$logger->info("PD UPDATED",array('ENV'=>ENVIRONMENT,'DATA' => $pd_details,'Pre-Status' => $exist_pd_details[0]['pd_status'],'Current_status' => $pd_details['pd_status']));
$logger->info("PD UPDATED",array('ENV'=>ENVIRONMENT,'DATA' => $pd_details,'Pre-Status' => $exist_pd_details[0]['pd_status'],'Current_status' => isset($pd_details['pd_status']) ? $pd_details['pd_status'] : ''));
PDALERTS::pdnotification($pd_details['pd_id']);
if(isset($pd_details['pd_status'])) { PDALERTS::pdnotification($pd_details['pd_id']); }
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;
$data['records'] = true;
@ -2184,7 +2184,7 @@ public function assignPDTempalate($data)
//Get Docs to be collected array
$result_data['docs_to_be_collected'] = $this->PD_Model->getDocsToBeCollected($pdid);
if($result_data['pd_master_details'][0]['fk_pd_type'] == 2) //smart pd get vendor forms status
if($result_data['pd_master_details'][0]['fk_pd_type'] == 2 && !$result_data['pd_master_details'][0]['is_vendor_visit_disabled']) //smart pd get vendor forms status
{
$result_data['vendor_form_status'] = $this->PD_Model->getVendorFormStatus($pdid,$result_data['pd_master_details']);
}

View File

@ -78,7 +78,7 @@ class pdcompletenesscheck
$sal_check = count($sal_check) ? $sal_check[0]['flag'] : null;
}
if($pd_master_details[0]['fk_pd_type'] == 2)
if($pd_master_details[0]['fk_pd_type'] == 2 && !$pd_master_details[0]['is_vendor_visit_disabled'])
{
$vendor_done_status = 1;
if(($pd_master_details[0]['is_qc_enabled'] && $pd_master_details[0]['vendor_status'] != QC_COMPLETED))

View File

@ -7,30 +7,34 @@ class vendor_form
{
$CI =&get_instance();
$CI->load->model('PD_Model');
//print_r($vendor_gen_section);die();
$return_data = '';
$is_applicant_not = false;
foreach ($vendor_gen_section['individuals'] as $ind_key => $ind_value)
{
if($ind_value['is_person_met'])
{
$return_data = "Applicant ( ".$ind_value['applicant_name']." ) was met at the visited address during Field Visit.";
$return_data = "Applicant ( ".$ind_value['applicant_name']." ) was met at the visited address during Field Visit.<br>";
$is_applicant_not = true;
break;
}
}
if($cus_type == 2 && !$is_applicant_not)
{
$return_data = "Applicant ( ".$vendor_gen_section['individuals'][0]['applicant_name']." ) was not met at the visited address during Field Visit.";
$return_data = "Applicant ( ".$vendor_gen_section['individuals'][0]['applicant_name']." ) was not met at the visited address during Field Visit.<br>";
//echo 'XXXXXXXXXXXXX';
}
if(!$is_applicant_not && $vendor_gen_section['is_met_during_visit'] && $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 Field Visit." : $vendor_gen_section['person_met_entered']. " met at the visited address during Field Visit.");
$return_data .= ($cus_type == 1 ? $vendor_gen_section['person_met_entered']." ( ".$vendor_gen_section['designation_entered'] ." ) met at the visited address during Field Visit.<br>" : $vendor_gen_section['person_met_entered']. " met at the visited address during Field Visit.<br>");
}
else if(!$is_applicant_not)
{
$return_data = 'During Field Visit, No one met at the visited premises.';
if($vendor_gen_section['is_employer_available'] != 'yes')
{
$return_data .= 'During Field Visit, No one met at the visited premises.';
}
if($cus_type == 2)
{
$return_data .= 'Field Visit officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.';
@ -89,6 +93,29 @@ class vendor_form
$company_relationship_id = $vendor_employer_info['employer_details']['designation_person_met'];
$company_relationship = $CI->PD_Model->selectCustomRecords(array('name'),array('company_relationship_id' => $company_relationship_id),COMPANYRELATIONSHIPS);
return $company_relationship && count($company_relationship) ? $company_relationship[0]['name'] : '';
}
static function getSalNotConfirmedResons($reson_array,$ot_reason)
{
if(is_array($reson_array) && count($reson_array))
{
$reason = '';
foreach ($reson_array as $key => $value)
{
// if(strtolower($value) != 'others please specify')
// echo $value.'---'.stripos($value,'others');
if((stripos($value,'others')) === false)
{
$reason .= $value.', ';
}
}
if($ot_reason){$reason.= $ot_reason.', ';}
if($reason){ $reason = substr_replace($reason,'',-2);$reason .='.'; }
return $reason;
}
}
}
?>

View File

@ -980,7 +980,7 @@ class PD_Model extends SPARQ_Model {
*/
public function getPDMasterDetails($pdid,$random_string = null)
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,PDTRIGGER.imgc_fin_institute,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,ENTITY.is_score_card_enabled,ENTITY.is_otp_enabled, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PRODUCTS.prod_catagory,PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %h:%i:%s %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.is_qc_enabled,AGENCY.full_name as agency_name,AGENCY.short_name as agency_short_name,PDTRIGGER.vendor_pdofficer,concat(VENDORPDOFFICER.first_name," ",VENDORPDOFFICER.last_name) as vendor_pdofficer_name,PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.lender_sales_person,concat(LENDERSALESPERSON.first_name," ",LENDERSALESPERSON.last_name) as lender_sales_person_name,LENDERSALESPERSON.mobile_no as lender_sales_contact_mobileno,LENDERSALESPERSON.email as lender_sales_person_email,PDTRIGGER.lender_credit_person,concat(LENDERCREDITPERSON.first_name," ",LENDERCREDITPERSON.last_name) as lender_credit_person_name,LENDERCREDITPERSON.mobile_no as lender_credit_person_contact_mobileno,LENDERCREDITPERSON.email as lender_credit_person_email,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,OTPREJECTION.rejection_reason,PDTRIGGER.otp_reject_other_reason,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited,PDTRIGGER.is_zip_created,PDTRIGGER.pd_qc_note,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,PDTRIGGER.is_notify_enabled,ENTITYFININSTITUTION.institute_name as fin_institute_name,PDTRIGGER.is_img_pdf_created,PDTRIGGER.is_video_merged,PDTRIGGER.vendor_status,PDTRIGGER.vendor_scheduled_on as vendor_scheduled_on_validation,DATE_FORMAT(PDTRIGGER.vendor_scheduled_on,"%d/%m/%Y %h:%i %p") as vendor_scheduled_on');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,PDTRIGGER.imgc_fin_institute,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,ENTITY.is_score_card_enabled,ENTITY.is_otp_enabled, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PRODUCTS.prod_catagory,PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %h:%i:%s %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.is_qc_enabled,AGENCY.full_name as agency_name,AGENCY.short_name as agency_short_name,PDTRIGGER.vendor_pdofficer,concat(VENDORPDOFFICER.first_name," ",VENDORPDOFFICER.last_name) as vendor_pdofficer_name,PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.lender_sales_person,concat(LENDERSALESPERSON.first_name," ",LENDERSALESPERSON.last_name) as lender_sales_person_name,LENDERSALESPERSON.mobile_no as lender_sales_contact_mobileno,LENDERSALESPERSON.email as lender_sales_person_email,PDTRIGGER.lender_credit_person,concat(LENDERCREDITPERSON.first_name," ",LENDERCREDITPERSON.last_name) as lender_credit_person_name,LENDERCREDITPERSON.mobile_no as lender_credit_person_contact_mobileno,LENDERCREDITPERSON.email as lender_credit_person_email,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,OTPREJECTION.rejection_reason,PDTRIGGER.otp_reject_other_reason,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited,PDTRIGGER.is_zip_created,PDTRIGGER.pd_qc_note,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,ENTITY.is_vendor_visit_disabled,PDTRIGGER.is_notify_enabled,ENTITYFININSTITUTION.institute_name as fin_institute_name,PDTRIGGER.is_img_pdf_created,PDTRIGGER.is_video_merged,PDTRIGGER.vendor_status,PDTRIGGER.vendor_scheduled_on as vendor_scheduled_on_validation,DATE_FORMAT(PDTRIGGER.vendor_scheduled_on,"%d/%m/%Y %h:%i %p") as vendor_scheduled_on');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
$this->db->JOIN(ENTITY.' as SUBENTITY','PDTRIGGER.sub_entity_id = SUBENTITY.entity_id ','LEFT');
@ -1385,7 +1385,7 @@ class PD_Model extends SPARQ_Model {
$result_data['pdmaster_details'] = $pd_master_detials[0];
}
$result_data['pdapplicants_detials'] = $pd_applicants_detials;
if($pd_master_detials[0]['fk_pd_type'] == 2)
if($pd_master_detials[0]['fk_pd_type'] == 2 && !$pd_master_detials[0]['is_vendor_visit_disabled'])
{
$result_data['vendor_form_status'] = $this->getVendorFormStatus($pdid);
}

View File

@ -1157,13 +1157,14 @@ font-weight: bolder;;
{
if($employeement_data['was_met'] == 'yes')
{
echo '<p>During PD '.$employeement_data['name_person_met'] .' who is ('.$employeement_data['designation_person_met_master'] .') of the company/firm was met/contacted.</p>';
$designation_of_person_met = $employeement_data['designation_person_met'] == 1 ? $employeement_data['others_person_met'] : $employeement_data['designation_person_met_master'];
echo '<p>During PD '.$employeement_data['name_person_met'] .' who is ('.$designation_of_person_met .') of the company/firm was met/contacted.</p>';
}
else
{
echo '<p>During PD employer/Manager was not met/contacted.</p>';
}
if($employer_details['visiting_card'] == 'yes'){ echo '<p>Person met/contacted provided company ID Card/Visiting Card.</p>';}else{ echo '<p>Person met/contacted was not provided company ID Card/Visiting Card.</p>'; }
if($employeement_data['visiting_card'] == 'yes'){ echo '<p>Person met/contacted provided company ID Card/Visiting Card.</p>';}else{ echo '<p>Person met/contacted was not provided company ID Card/Visiting Card.</p>'; }
echo "<p><b>Employer Name : </b>". explode('-', $employeement_data['employer_name'])[1] ."</p>" ;
echo "<p style='text-align:justify'><b>Company Profile : </b>". $employeement_data['employer_in_brief'] ."</p>" ;
@ -1176,7 +1177,7 @@ font-weight: bolder;;
// echo $employeement_data['was_met'] == 'no'? "<p>No one was met at the visited premises who could confirm the employment details of loan applicant. </p>":"<p>During PD visit, ".$employeement_data['name_person_met'].' ( '. ($employeement_data['others_person_met'] ? $employeement_data['others_person_met'] : $employeement_data['designation_person_met_master']) .' ) was met at the visited premises.';
echo ($employeement_data['confirm_salary'] == 'no'? '<p>Salary amount was not confirmed person met/contacted because '.$employeement_data['sal_amount_was_not_confirmed'].' </p>' : '<p>Salary amount confirmed by person met/contacted is '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).'.</p>');
// echo ($employeement_data['confirm_salary'] == 'no'? '<p>Salary amount was not confirmed person met/contacted because '.$employeement_data['sal_amount_was_not_confirmed'].' </p>' : '<p>Salary amount confirmed by person met/contacted is '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).'.</p>');
// echo $employeement_data['attendance_seen'] == 'no' ? "<p>Attendance Register was not seen during visit.</p>": "<p>Attendance register was seen during visit. </p>";
@ -1225,30 +1226,51 @@ font-weight: bolder;;
echo $employeement_data['employment_remarks'] != "" ? "<p>".$employeement_data['employment_remarks']."</p>": "";
echo "<h3>Employment Document Sighted</h3>" ;
if($employeement_data['doc_not_available'] == 'yes')
{
echo '<p>Following documents sighted of applicants employment.</p>';
// foreach ($variable as $key => $value)
// {
// }
}
else
{
$doc_not_available_resan = '';
foreach ($employeement_data['doc_not_available'] as $dna_key => $dna_value)
{
$doc_not_available_resan .= $dna_value.', ';
}
//$doc_not_available_resan = $employeement_data['doc_not_available_specify'] ? ($doc_not_available_resan.', ') : $doc_not_available_resan;
$doc_not_available_resan = $doc_not_available_resan ? ( substr_replace($doc_not_available_resan,' ',-2)) : '';
$document_name = '';
$document_name .= ($employeement_data['sal_reg_seen'] == 'yes' ? 'Salary Register, ': '');
$document_name .= ($employeement_data['attendance_seen'] == 'yes' ? 'Attendance Register, ' : '');
$document_name .= ($employeement_data['cash_voucher'] == 'yes'? 'Cash Voucher,' : '');
$document_name .= ($employeement_data['sal_certificate'] == 'yes' ? 'Salary Certificate, ' : '');
$document_name .= ($employeement_data['sal_slip'] == 'yes' ? 'Salary Slip, ': '');
$document_name .= ($employeement_data['other_doc'] == 'yes' ? $employeement_data['docs_sighted']['other_doc_name'].', ' : '');
$ids = '<p>Applicants employment documents were not seen';
if($doc_not_available_resan){$ids .= 'because '.$doc_not_available_resan;}
$ids .= '</p>';
echo $ids;
}
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
{
$reason = vendor_form::getSalNotConfirmedResons($employeement_data['docs_sighted']['doc_not_available'],(isset($employeement_data['docs_sighted']['doc_not_available_specify']) ? $employeement_data['docs_sighted']['doc_not_available_specify'] : ''));
$dis = '<p>Applicants employment documents were not seen during Field visit';
if($reason) { $dis .= " becasue, $reason"; }; $reason .= '</p>.';
echo $dis;
}
//******************old
// if(!$employeement_data['doc_not_available'])
// {
// echo '<p>Following documents sighted of applicants employment.</p>';
// // foreach ($variable as $key => $value)
// // {
// // }
// }
// else
// {
// $doc_not_available_resan = '';
// foreach ($employeement_data['doc_not_available'] as $dna_key => $dna_value)
// {
// $doc_not_available_resan .= $dna_value.', ';
// }
// //$doc_not_available_resan = $employeement_data['doc_not_available_specify'] ? ($doc_not_available_resan.', ') : $doc_not_available_resan;
// $doc_not_available_resan = $doc_not_available_resan ? ( substr_replace($doc_not_available_resan,' ',-2)) : '';
// $ids = '<p>Applicants employment documents were not seen';
// if($doc_not_available_resan){$ids .= 'because '.$doc_not_available_resan;}
// $ids .= '</p>';
// echo $ids;
// }
}
@ -2062,9 +2084,11 @@ font-weight: bolder;;
echo '</tbody></table>';
}
?>
<!-- ######################### VENDOR SECTION START ###########################-->
<!-- ######################### VENDOR SECTION START ###########################-->
<!-- ######################### VENDOR SECTION START ###########################-->
<?php
if(isset($pd_processed_forms[25][0]))
{
echo '<div id="page_break"></div>';
$vendor_form_json = json_decode($pd_processed_forms[25][0]['json'],true);
//print_r($vendor_form_json);die();
@ -2086,10 +2110,14 @@ font-weight: bolder;;
echo '<p>During Field visit,<span class="vsbtd">'. $employer_details['name_person_met'] .' ( '.substr_replace($vendor_emp_master,'',-3) .' )</span> was met at the visited premises.</p>';
echo isset($employer_details['visiting_card']) && $employer_details['visiting_card'] == 'yes' ? '<p>Employers/Managers Company ID card / Visiting Card <span class="vsbtd">was photographed during Field Visit.</span></p>' : '<p>Employers/Managers Company ID card / Visiting Card <span class="vsbtd">was not photographed during Field Visit.</span></p>';
echo isset($employer_details['confirm_salary']) && $employer_details['confirm_salary'] == 'yes' ? '<p>Salary amount <span class="vsbtd">was confirmed </span> by person met during Field Visit. Applicant gets monthly gross salary of <span class="vsbtd">'.$rupee_symbol." ".$employer_details['gross_monthly_salary'].'</span> and net monthly salary of <span class="vsbtd">'.$rupee_symbol." ".$employer_details['net_monthly_salary'].'</span>.</p>' : "<p>Salary amount was not confirmed because ".$employer_details['sal_amount_was_not_confirmed']."</p>";
echo '<p>Salary paid to the applicant between <span class="vsbtd">'. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).'</span> of every month via <span class="vsbtd">'.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.</span></p>';
$employee_sal_not_confirm_resan = vendor_form::getSalNotConfirmedResons($employer_details['sal_amount_was_not_confirmed'],(isset($employer_details['sal_amount_was_not_confirmed_others']) ? $employer_details['sal_amount_was_not_confirmed_others'] :''));
// echo $employee_sal_not_confirm_resan;
// print_r($employer_details['sal_amount_was_not_confirmed']);die();
echo isset($employer_details['confirm_salary']) && $employer_details['confirm_salary'] == 'yes' ? '<p>Salary amount <span class="vsbtd">was confirmed </span> by person met during Field Visit. Applicant gets monthly gross salary of <span class="vsbtd">'.$rupee_symbol." ".$employer_details['gross_monthly_salary'].'</span> and net monthly salary of <span class="vsbtd">'.$rupee_symbol." ".$employer_details['net_monthly_salary'].'</span>.</p>' : "<p>Salary amount was not confirmed because ".$employee_sal_not_confirm_resan."</p>";
if((isset($employer_details['from_date_the_salary_is_rcv']) && is_numeric($employer_details['from_date_the_salary_is_rcv'])) && isset($employer_details['to_date_the_salary_is_rcv']) && is_numeric($employer_details['to_date_the_salary_is_rcv']))
{
echo '<p>Salary paid to the applicant between <span class="vsbtd">'. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).'</span> of every month via <span class="vsbtd">'.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.</span></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 <span class="vsbtd">'.$time.'</span> an employee in this firm / company.</p>';
}
@ -2099,7 +2127,7 @@ font-weight: bolder;;
// echo '<p>Employers/Managers Company ID card / Visiting Card was not photographed during Field visit.</p>';
// echo '<p>Salary amount was not confirmed</p>';
}
//print_r($vendor_employer_info['docs_sighted']);die();
if(isset($vendor_employer_info['docs_sighted']))
{
//print_r($vendor_employer_info['docs_sighted']['sal_reg_seen'] == 'yes' ? 'Salary Register': '');die();
@ -2117,15 +2145,22 @@ font-weight: bolder;;
$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
{
$reason = vendor_form::getSalNotConfirmedResons($vendor_employer_info['docs_sighted']['doc_not_available'],(isset($vendor_employer_info['docs_sighted']['doc_not_available_specify']) ? $vendor_employer_info['docs_sighted']['doc_not_available_specify'] : ''));
$dis = '<p>Applicants employment documents were not seen during Field visit';
if($reason) { $dis .= " becasue, $reason"; }; $reason .= '</p>.';
echo $dis;
}
}
else
{
$reason = '';
$dis = '<p>Applicants employment documents were not seen during Field visit';
if($reason) { $dis .= "becasue, $reason"; }; $reason .= '</p>.';
echo $dis;
}
// else
// {
// $reason = '';
// $dis = '<p>Applicants employment documents were not seen during Field visit';
// if($reason) { $dis .= "becasue, $reason"; }; $reason .= '</p>.';
// echo $dis;
// }
if((isset($vendor_employer_info['nameboard_photographs']) && count($vendor_employer_info['nameboard_photographs'])) || (isset($vendor_employer_info['office_photographs']) && count($vendor_employer_info['office_photographs'])))
{
@ -2140,25 +2175,25 @@ font-weight: bolder;;
foreach ($vendor_credit_manager_info['docs_to_be_sighted'] as $cm_key => $cm_value)
{
echo '<span class="vsbtd">Document Required:</span>'.$cm_value['placeholder'].'<br>';
echo '<span class="vsbtd">Provided (Yes / No):</span>'.ucfirst($cm_value[ $cm_value['control_name'] ] );
echo '<span class="vsbtd">Provided (Yes / No):</span>'.ucfirst($cm_value[ $cm_value['control_name'] ] ).' '.($cm_value[ $cm_value['control_name'] ] == 'yes' ? ', Document available in zipped file enclosed with report.' : '');
echo isset($cm_value['reason']) ? '<br><span class="vsbtd">Reason:</span>'.$cm_value['reason'] : '';
}
}
//, Document available in zipped file enclosed with report.
echo '<h2>Address Section</h2>';
$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>";
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>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>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 style='text-align:justify;'>The Field Visit was done at <span class='vsbtd'>".$address_content['address_type']."</span> of the loan applicants. The ".$address_content['address_type']." is located in a <span class='vsbtd'>".$address_content['address_locality']."</span>.The location was <span class='vsbtd'>".$address_content['pd_location_approach']."</span>. As Per Officer, the ".$address_content['address_type']." is situated in <span class='vsbtd'>$locality Locality</span>.</p>";
echo "<p style='text-align:justify;'>The FI was done at <span class='vsbtd'>".$address_content['address_type']."</span> of the loan applicants. The <span class='vsbtd'>".$address_content['address_type']."</span> is located in a <span class='vsbtd'>".$address_content['address_locality']."</span>.The PD location was <span class='vsbtd'>".$address_content['pd_location_approach']."</span>. As FI Per Officer, the <span class='vsbtd'>".$address_content['address_type']."</span> is situated in <span class='vsbtd'>$locality Locality</span>.</p>";
// echo '<p><b>Submit:</b></p>';
$vendoe_final_remars = $vendor_form_json['questions'][5];
@ -2185,7 +2220,7 @@ font-weight: bolder;;
echo '<p><b span class="vsbtd">Date & Time of visit:</span>'.$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 ###########################-->