diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 47e1ae36..5fb05843 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -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']); } diff --git a/api/application/helpers/pdcompletenesscheck_helper.php b/api/application/helpers/pdcompletenesscheck_helper.php index 5ac6729d..3298e737 100644 --- a/api/application/helpers/pdcompletenesscheck_helper.php +++ b/api/application/helpers/pdcompletenesscheck_helper.php @@ -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)) diff --git a/api/application/helpers/vendor_form_helper.php b/api/application/helpers/vendor_form_helper.php index 2c0d3b39..7e4883ef 100644 --- a/api/application/helpers/vendor_form_helper.php +++ b/api/application/helpers/vendor_form_helper.php @@ -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.
"; $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.
"; + //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.
" : $vendor_gen_section['person_met_entered']. " met at the visited address during Field Visit.
"); } 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; + + } } } ?> \ No newline at end of file diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 9b1a2736..0081d4a0 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -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); } diff --git a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php index de39006d..1e2b291b 100644 --- a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php @@ -1157,13 +1157,14 @@ font-weight: bolder;; { if($employeement_data['was_met'] == 'yes') { - echo '

During PD '.$employeement_data['name_person_met'] .' who is ('.$employeement_data['designation_person_met_master'] .') of the company/firm was met/contacted.

'; + $designation_of_person_met = $employeement_data['designation_person_met'] == 1 ? $employeement_data['others_person_met'] : $employeement_data['designation_person_met_master']; + echo '

During PD '.$employeement_data['name_person_met'] .' who is ('.$designation_of_person_met .') of the company/firm was met/contacted.

'; } else { echo '

During PD employer/Manager was not met/contacted.

'; } - if($employer_details['visiting_card'] == 'yes'){ echo '

Person met/contacted provided company ID Card/Visiting Card.

';}else{ echo '

Person met/contacted was not provided company ID Card/Visiting Card.

'; } + if($employeement_data['visiting_card'] == 'yes'){ echo '

Person met/contacted provided company ID Card/Visiting Card.

';}else{ echo '

Person met/contacted was not provided company ID Card/Visiting Card.

'; } echo "

Employer Name : ". explode('-', $employeement_data['employer_name'])[1] ."

" ; echo "

Company Profile : ". $employeement_data['employer_in_brief'] ."

" ; @@ -1176,7 +1177,7 @@ font-weight: bolder;; // echo $employeement_data['was_met'] == 'no'? "

No one was met at the visited premises who could confirm the employment details of loan applicant.

":"

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'? '

Salary amount was not confirmed person met/contacted because '.$employeement_data['sal_amount_was_not_confirmed'].'

' : '

Salary amount confirmed by person met/contacted is '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).'.

'); + // echo ($employeement_data['confirm_salary'] == 'no'? '

Salary amount was not confirmed person met/contacted because '.$employeement_data['sal_amount_was_not_confirmed'].'

' : '

Salary amount confirmed by person met/contacted is '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).'.

'); // echo $employeement_data['attendance_seen'] == 'no' ? "

Attendance Register was not seen during visit.

": "

Attendance register was seen during visit.

"; @@ -1225,30 +1226,51 @@ font-weight: bolder;; echo $employeement_data['employment_remarks'] != "" ? "

".$employeement_data['employment_remarks']."

": ""; echo "

Employment Document Sighted

" ; - if($employeement_data['doc_not_available'] == 'yes') - { - echo '

Following documents sighted of applicant’s employment.

'; - // 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 = '

Applicant’s employment documents were not seen'; - if($doc_not_available_resan){$ids .= 'because '.$doc_not_available_resan;} - $ids .= '

'; - echo $ids; - } + if($document_name != '') + { + $document_name = substr_replace($document_name,'', -2); + echo "

$document_name were seen during Field visit and photographs of same is available in zipped file enclosed with report.

"; + } + 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 = '

Applicant’s employment documents were not seen during Field visit'; + if($reason) { $dis .= " becasue, $reason"; }; $reason .= '

.'; + echo $dis; + } + //******************old + // if(!$employeement_data['doc_not_available']) + // { + // echo '

Following documents sighted of applicant’s employment.

'; + // // 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 = '

Applicant’s employment documents were not seen'; + // if($doc_not_available_resan){$ids .= 'because '.$doc_not_available_resan;} + // $ids .= '

'; + // echo $ids; + // } } @@ -2062,9 +2084,11 @@ font-weight: bolder;; echo ''; } ?> - + '; $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 '

During Field visit,'. $employer_details['name_person_met'] .' ( '.substr_replace($vendor_emp_master,'',-3) .' ) was met at the visited premises.

'; echo isset($employer_details['visiting_card']) && $employer_details['visiting_card'] == 'yes' ? '

Employer’s/Manager’s Company ID card / Visiting Card was photographed during Field Visit.

' : '

Employer’s/Manager’s Company ID card / Visiting Card was not photographed during Field Visit.

'; - - echo isset($employer_details['confirm_salary']) && $employer_details['confirm_salary'] == 'yes' ? '

Salary amount was confirmed by person met during Field Visit. Applicant gets monthly gross salary of '.$rupee_symbol." ".$employer_details['gross_monthly_salary'].' and net monthly salary of '.$rupee_symbol." ".$employer_details['net_monthly_salary'].'.

' : "

Salary amount was not confirmed because ".$employer_details['sal_amount_was_not_confirmed']."

"; - - echo '

Salary paid to the applicant between '. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).' of every month via '.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.

'; + $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' ? '

Salary amount was confirmed by person met during Field Visit. Applicant gets monthly gross salary of '.$rupee_symbol." ".$employer_details['gross_monthly_salary'].' and net monthly salary of '.$rupee_symbol." ".$employer_details['net_monthly_salary'].'.

' : "

Salary amount was not confirmed because ".$employee_sal_not_confirm_resan."

"; + 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 '

Salary paid to the applicant between '. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).' of every month via '.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.

'; + } $time = $employer_details['how_long_year'].' year(s)'; $time .= ($employer_details['how_long_year'] ? ' and '.$employer_details['how_long_year'] .' month(s)': ''); echo '

During Field Visit, Employer confirmed that the applicant has served '.$time.' an employee in this firm / company.

'; } @@ -2099,7 +2127,7 @@ font-weight: bolder;; // echo '

Employer’s/Manager’s Company ID card / Visiting Card was not photographed during Field visit.

'; // echo '

Salary amount was not confirmed

'; } - + //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 "

$document_name were seen during Field visit and photographs of same is available in zipped file enclosed with report.

"; } + 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 = '

Applicant’s employment documents were not seen during Field visit'; + if($reason) { $dis .= " becasue, $reason"; }; $reason .= '

.'; + echo $dis; + } } - else - { - $reason = ''; - $dis = '

Applicant’s employment documents were not seen during Field visit'; - if($reason) { $dis .= "becasue, $reason"; }; $reason .= '

.'; - echo $dis; - } + // else + // { + // $reason = ''; + // $dis = '

Applicant’s employment documents were not seen during Field visit'; + // if($reason) { $dis .= "becasue, $reason"; }; $reason .= '

.'; + // 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 'Document Required:'.$cm_value['placeholder'].'
'; - echo 'Provided (Yes / No):'.ucfirst($cm_value[ $cm_value['control_name'] ] ); + echo 'Provided (Yes / No):'.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']) ? '
Reason:'.$cm_value['reason'] : ''; } } - +//, Document available in zipped file enclosed with report. echo '

Address Section

'; $vendor_address_section = $vendor_form_json['questions'][1]; $address_content = vendor_form::getVendoraddressSectionContent($vendor_address_section,2); - echo "

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']."

"; + echo "

FI Initiated Address: ".$vendor_address_section['address'].", ". $address_content['initiated_address']['city_name'] .", ".$address_content['initiated_address']['state_name']." - ".$address_content['initiated_address']['pincode']."

"; if(!$vendor_address_section['is_pd_done_on_initiated_address']) { - echo "

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']."

"; + echo "

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']."

"; echo "

Reasaon: ".$vendor_address_section['alternative_addresses'][0]['reason_for_alternative_address']."

"; } $locality = preg_match("/^[aeiouAEIOU]/U", $address_content['comment_locality']) ? 'an '.$address_content['comment_locality'] : 'a '.$address_content['comment_locality']; - echo "

The Field 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 location was ".$address_content['pd_location_approach'].". As Per Officer, the ".$address_content['address_type']." is situated in $locality Locality.

"; + echo "

The FI 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 FI Per Officer, the ".$address_content['address_type']." is situated in $locality Locality.

"; // echo '

Submit:

'; $vendoe_final_remars = $vendor_form_json['questions'][5]; @@ -2185,7 +2220,7 @@ font-weight: bolder;; echo '

Date & Time of visit:'.$pd_master_details[0]['pd_visit_date'].'

'; // echo '
'; - + } ?>