From db0e43d33f7daeb17d80152e6f5ffa2080d01060 Mon Sep 17 00:00:00 2001
From: VE10-Sanjeev
Date: Sat, 29 Oct 2022 21:12:48 +0530
Subject: [PATCH] Testing FIREPORT feedback : ps
---
api/application/controllers/PD_Controller.php | 14 +-
.../helpers/getprocessedjson_helper.php | 44 ++++
api/application/models/PD_Model.php | 19 +-
.../JSONTOREPORT_FI_OV_DI.php | 175 +++------------
.../JSONTOREPORT_FI_OV_SAL.php | 204 ++++--------------
.../report_templates/JSONTOREPORT_FI_RV.php | 168 ++-------------
6 files changed, 156 insertions(+), 468 deletions(-)
diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index a62d7078..eb781206 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -2722,17 +2722,7 @@ class PD_Controller extends REST_Controller
unset($processed_json['docs_to_be_sighted']);
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;
+ $processed_json = GETPROCESSEDJSON::convertFIGeneralDetailsForm($records, $formid);
break;
case 28:
$processed_json = GETPROCESSEDJSON::convertFIAddressForm($records, $formid);
@@ -8513,7 +8503,7 @@ class PD_Controller extends REST_Controller
$img_array['Name'] = $main_applicant_name[0]['applicant_name'];
$current_doc_title = $main_applicant_name[0]['applicant_name'];
- if ($pd_master_details[0]['fk_pd_type'] == 2) // if smard pd
+ if ($pd_master_details[0]['fk_pd_type'] == 2 || $pd_master_details[0]['fk_pd_type'] == 4) // if smard pd and fi pd
{
$this->PD_Model->updateRecords(array('start_location' => $records['link']), PDTRIGGER, array('pd_id' => $records['fk_pd_id']));
satellite_image::getSatelliteImage($records['fk_pd_id']);
diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php
index 40ec6731..0119236f 100644
--- a/api/application/helpers/getprocessedjson_helper.php
+++ b/api/application/helpers/getprocessedjson_helper.php
@@ -2713,6 +2713,50 @@ class GETPROCESSEDJSON
return $records;
}
/************************########### END OF EMPLOYMENT FORM #################****************************/
+
+ /*****************########## START FI-GENERAL FORM DETAILS ##########**************/
+ public static function convertFIGeneralDetailsForm($raw_json,$formid)
+ {
+
+
+ $CI =& get_instance();
+ if(!empty($raw_json))
+ {
+ foreach ($raw_json as $key => $value){
+ if(isset($value['Designation_of_Person_met']) && $value['Designation_of_Person_met'] != "")
+ {
+ $cr = $CI->PD_Model->selectCustomRecords(array('*'),array('company_relationship_id' =>$value['Designation_of_Person_met'] ),COMPANYRELATIONSHIPS);
+ if($cr)
+ {
+ $raw_json[$key]['designation_person_met_master'] = $cr[0]['name'];
+ }
+ }
+
+ if(isset($value['Name_of_the_Person_met']) && $value['Name_of_the_Person_met'] != "")
+ {
+ $CI->db->SELECT('applicant_name');
+ $CI->db->FROM(PDAPPLICANTSDETAILS);
+ //$CI->db->WHERE('isactive',1);
+ $CI->db->WHERE( 'pd_co_applicant_id' ,$value['Name_of_the_Person_met']);
+ $name= $CI->db->GET()->result_array();
+ //print_r($CI->db->last_query());
+ //print_r($name);
+ if(count($name))
+ {
+ $raw_json[$key]['Name_of_the_Person_met_master'] = $name[0]['applicant_name'];
+ }
+
+ }
+ }
+
+
+
+ }
+ return $raw_json;
+ //print_r($raw_json);
+ }
+ /*****************########## END FI-GENERAL FORM DETAILS ##########**************/
+
/*****************########## FI-ADDRESS FORM DETAILS ##########********************/
public static function convertFIAddressForm($raw_json,$formid)
diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php
index 52e5eacf..403dded1 100644
--- a/api/application/models/PD_Model.php
+++ b/api/application/models/PD_Model.php
@@ -2610,14 +2610,19 @@ class PD_Model extends SPARQ_Model {
if(count($template_forms) > 0){
if((int)$pd_master_detials[0]['fk_pd_type'] == 4){
if(!empty($pd_additional_requirements)){
- array_push($template_forms,Array('map_id'=>$map_id,'form_id' => '31','pd_form_order' => '5','pd_form_level_order' => '2','form_name' => 'Credit Manager Queries','is_form_disabled'=>0,"template_id"=>null));
+ array_push($template_forms,Array('map_id'=>$map_id,'form_id' => '31','pd_form_order' => '4','pd_form_level_order' => '2','form_name' => 'Credit Manager Queries','is_form_disabled'=>0,"template_id"=>null));
+ $keys = array_column($template_forms, 'pd_form_order');
+ array_multisort($keys, SORT_ASC, $template_forms);
+ // $count = count($template_forms);
+ // $inserted = array("template_id"=>null,'map_id'=>$map_id,'form_id' => '31','pd_form_order' => '4','pd_form_level_order' => '2','form_name' => 'Credit Manager Queries','is_form_disabled'=>0);
+ // $template_forms = $this->array_splice_after_key($template_forms, ($count-1), $inserted);
}
}else{
array_push($template_forms,Array('map_id'=>$map_id,'form_id' => '18','pd_form_order' => '2','pd_form_level_order' => '1','form_name' => 'General Information','is_form_disabled'=>0,"template_id"=>null));
array_push($template_forms,Array('map_id'=>$map_id,'form_id' => '26','pd_form_order' => '24','pd_form_level_order' => '1','form_name' => 'Photograph','is_form_disabled'=>0,"template_id"=>null));
}
}
-
+ // print_r($template_forms);
$buiness_related_form = array(22,14,1,2,11,16);
if(!strcasecmp($pd_master_detials[0]['lender_short_name'], 'CLIX')){
array_push($buiness_related_form,21);//buiness banking form id pushed for filter.
@@ -2891,4 +2896,14 @@ class PD_Model extends SPARQ_Model {
return $value[$key] == $keyValue;
});
}
+function array_splice_after_key($array, $key, $array_to_insert)
+{
+ $key_pos = array_search($key, array_keys($array));
+ if($key_pos !== false){
+ $key_pos++;
+ $second_array = array_splice($array, $key_pos);
+ $array = array_merge($array, $array_to_insert, $second_array);
+ }
+ return $array;
+}
}
\ No newline at end of file
diff --git a/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php b/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php
index 2142e582..764fd321 100644
--- a/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php
+++ b/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php
@@ -385,7 +385,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '| Visit Initiated Date | : | ' . $pd_master_details[0]['createdon'] . ' |
';
echo '| Visit Date | : | ' . $pd_master_details[0]['pd_visit_date'] . ' |
';
echo '| Visit Report Date | : | ' . $pd_master_details[0]['pd_report_generated_date'] . ' |
';
- echo '| Visit Initiated by | : | ' . $pd_master_details[0]['branch_name'] . ' Branch |
';
+ echo '| Visit Initiated by | : | ' . $pd_master_details[0]['lender_full_name'] . ' |
';
echo '| Loan Application ID | : | ' . $pd_master_details[0]['lender_applicant_id'] . ' |
';
echo '| Product | : | Home Loan |
';
echo '| Customer Segment | : | Self Employed |
';
@@ -418,10 +418,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
- if ($value['is_person_met'] == 'yes') {
- echo '' . 'Applicant ('.$value['Name_of_the_Person_met'].') was met at the visited address.' . '
';
- }else if ($value['is_person_met'] == 'no') {
- echo '' . '('.$value['Name_of_the_Person'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '
';
+ if (strtoupper($value['is_person_met']) == 'YES') {
+ echo '' . 'Applicant ('.$value['Name_of_the_Person_met_master'].') was met at the visited address.' . '
';
+ }else if (strtoupper($value['is_person_met']) == 'NO') {
+ echo '' . '('.$value['Name_of_the_Person'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit.' . '
';
}
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
echo '' . $general_form['general_remark'] . '
';
@@ -434,14 +434,13 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '
';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$address_value = $address_form['json'];
- // print_r($address_value);
if(!empty($address_value)){
echo 'ADDRESS DETAILS:
';
- if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
+ if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
echo '' . '
Visit Initiated Address: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
';
}
- if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
+ if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'NO') {
echo '' . '
Address Where Visit is Initiated: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
Address Where Visit was actually done: '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
@@ -463,13 +462,13 @@ defined('BASEPATH') or exit('No direct script access allowed');
$business_activities_during_visit = implode(', ', $ov_value['Was_any_business_activities_observed_during_visit']);
$business_activities_during_visit = preg_replace("/_/i", ' ', $business_activities_during_visit );
$business_activities_during_visit = ucwords($business_activities_during_visit);
- $company_name_sighted = $ov_value['was_the_company_name_board_sighted'] == 'Yes' ? 'seen' : 'not seen';
+ $company_name_sighted = strtoupper($ov_value['was_the_company_name_board_sighted']) == 'YES' ? 'seen' : 'not seen';
echo '
- Brief of the Business / Service Model: '.$ov_value['business_brief'].'.
- Visited address is of a '.$ov_value['visited_address_is'].'.
- At the time of visit, the officer sighted '.$ov_value['no_of_employees_sighted_by_PD_officer_during_visit'].' employees at the business premises.
- The Business Name board was '.$company_name_sighted.' at the visited address.
';
- if($ov_value['do_you_want_to_add_other_documents'] == 'Yes'){
+ if(strtoupper($ov_value['do_you_want_to_add_other_documents']) == 'YES'){
echo '- '.$ov_value['remarks_others'].' was sighted during visit and pictures are enclosed with the Report.
';
}
if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
@@ -479,10 +478,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '- The '.$ov_value['visited_address_is'].' is Rented or Owned is Not Disclosed by the person met.
';
}
echo '- Business Activity was '.$company_name_sighted.' and '.$business_activities_during_visit.'
';
- if($ov_value['stock_photograph'] == 'Yes'){
+ if(strtoupper($ov_value['stock_photograph']) == 'YES'){
echo '- Stock was seen during visit and pictures are enclosed with the Report.
';
}
- if($ov_value['stock_photograph'] == 'No'){
+ if(strtoupper($ov_value['stock_photograph']) == 'NO'){
echo '- Stock was not seen during visit because '.$ov_value['reason_of_stock_non_availability'].' .
';
}
echo '
';
@@ -534,7 +533,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." was not aware of how long the business is in operation.";
}
$ownwers_list = '';
- if(isset($neighbour_value['know_organisation_owner']) && $neighbour_value['know_organisation_owner'] == 'yes'){
+ if(isset($neighbour_value['know_organisation_owner']) && strtoupper($neighbour_value['know_organisation_owner']) == 'YES'){
if(isset($neighbour_value['organisation_owner'])){
// echo "type" . gettype($neighbour_value['organisation_owner']);
for($i = 0; $i < count($neighbour_value['organisation_owner']); $i++)
@@ -610,11 +609,9 @@ defined('BASEPATH') or exit('No direct script access allowed');
';
@@ -640,8 +637,8 @@ defined('BASEPATH') or exit('No direct script access allowed');
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
echo 'Document Required : ' . $doc_value['doc_name'] . '
';
- echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '
' : 'NO
');
- if ($doc_value['ans'] != 'yes') {
+ echo 'Provided ( Yes / No ) : ' . (strtoupper($doc_value['ans']) == 'YES' ? 'YES, Document available in zipped file enclosed with report' . '
' : 'NO
');
+ if (strtoupper($doc_value['ans']) != 'YES') {
echo 'Reason : ' . $doc_value['reason'];
}
echo '
';
@@ -675,51 +672,22 @@ defined('BASEPATH') or exit('No direct script access allowed');
?>
-
-
+
+
VISITING OFFICER`S REMARKS
- ';
- // echo '
Personal feedback or market intelligence on the case (if any):
';
- // echo '
' . $final_remark_data['market_intelligence'] . '
';
- // echo '
';
- // //echo '
';
- // }
- ?>
- - Customer Behaviour:
-
-
-
✔';
- ?>
-
-
- |
- Polite
-
- |
-
- Rude
-
- |
-
-
- Others*
-
- |
-
-
-
-
-
';
- } ?>
+ ?>
- - PD Officer’s overall assessment:
+ - Final Status of Field Visit:
@@ -820,50 +738,11 @@ defined('BASEPATH') or exit('No direct script access allowed');
-
+
+ Remarks:
+ ' . $pd_officer_final_remark . '
' ?>
-
-
- PD officer recommendation is ' . $fo_diplay . '.
';
- if(isset($final_remark_data['recommendation_positive'])){?>
-
- The following key points were considered while arriving at the aforementioned status.
- ";
- foreach ($final_remark_data['recommendation_positive'] as $pos) {
- echo "" . $pos['reason_for_positive'] . "";
- }
- } else if ($negative) {
- echo "";
- foreach ($final_remark_data['recommendation_negative'] as $neg) {
- echo "- " . $neg['reason_for_negative'] . "
";
- }
- } else if ($refer_to_credit) {
- echo "";
- foreach ($final_remark_data['recommendation_refer_to_credit'] as $rtc) {
- echo "- " . $rtc['reason_for_refer_to_credit'] . "
";
- }
- }
- echo "
";
- }
- ?>
-" . $other_command_remark . "";
- }
-
- echo '' . $pd_officer_final_remark . '
'
-?>
Visit Initiated Date | : | ' . $pd_master_details[0]['createdon'] . ' | ';
echo '| Visit Date | : | ' . $pd_master_details[0]['pd_visit_date'] . ' |
';
echo '| Visit Report Date | : | ' . $pd_master_details[0]['pd_report_generated_date'] . ' |
';
- echo '| Visit Initiated by | : | ' . $pd_master_details[0]['branch_name'] . ' Branch |
';
+ echo '| Visit Initiated by | : | ' . $pd_master_details[0]['lender_full_name'] . ' |
';
echo '| Loan Application ID | : | ' . $pd_master_details[0]['lender_applicant_id'] . ' |
';
echo '| Product | : | Home Loan |
';
- echo '| Customer Segment | : | Self Employed |
';
+ echo '| Customer Segment | : | Salaried |
';
?>
@@ -418,10 +418,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
- if ($value['is_person_met'] == 'yes') {
- echo '' . 'Applicant ('.$value['Name_of_the_Person_met'].') was met at the visited address.' . '
';
- }else if ($value['is_person_met'] == 'no') {
- echo '' . 'During PD ('.$value['Name_of_the_Person'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '
';
+ if (strtoupper($value['is_person_met']) == 'YES') {
+ echo '' . 'Applicant ('.$value['Name_of_the_Person_met_master'].') was met at the visited address.' . '
';
+ }else if (strtoupper($value['is_person_met']) == 'NO') {
+ echo '' . 'During PD ('.$value['Name_of_the_Person'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit.' . '
';
}
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
echo '' . $general_form['general_remark'] . '
';
@@ -436,11 +436,11 @@ defined('BASEPATH') or exit('No direct script access allowed');
$address_value = $address_form['json'];
if(!empty($address_value)){
echo 'ADDRESS DETAILS:
';
- if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
+ if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
echo '' . '
Visit Initiated Address: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
';
}
- if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
+ if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'NO') {
echo '' . '
Address Where Visit is Initiated: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
Address Where Visit was actually done: '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
@@ -458,24 +458,25 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '
VISIT DETAILS:
';
$Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true);
$ov_value = $Office_visit_data['json'];
- // print_r($ov_value);
+ print_r($ov_value);
- $company_name_sighted = $ov_value['was_the_company_name_board_sighted'] == 'Yes' ? 'seen' : 'not seen';
- $business_activities = $ov_value['Was_any_business_activities_observed_during_visit'] == 'Yes' ? 'seen' : 'not seen';
+ $company_name_sighted = strtoupper($ov_value['was_the_company_name_board_sighted']) == 'YES' ? 'seen' : 'not seen';
+ $business_activities = strtoupper($ov_value['Was_any_business_activities_observed_during_visit']) == 'YES' ? 'seen' : 'not seen';
$business_activities_during_visit = '';
- if($ov_value['Was_any_business_activities_observed_during_visit'] == 'Yes'){
+ if(strtoupper($ov_value['Was_any_business_activities_observed_during_visit']) == 'YES'){
$business_activities_during_visit = implode(', ', $ov_value['If_yes_choose_one']);
$business_activities_during_visit = preg_replace("/_/i", ' ', $business_activities_during_visit );
$business_activities_during_visit = ' and '.ucwords($business_activities_during_visit);
- if(isset($ov_value['Others_Please_specify'])){ $business_activities_during_visit = $business_activities_during_visit.', '.$ov_value['Others_Please_specify'];}
+ // if(isset($ov_value['Others_Please_specify'])){ $business_activities_during_visit = $business_activities_during_visit.'('.$ov_value['Others_Please_specify'].')'; }
+ if(isset($ov_value['Others_Please_specify'])){ $business_activities_during_visit = str_replace("Others",$ov_value['Others_Please_specify'],$business_activities_during_visit); }
}
- $year = $ov_value['year'].(abs($ov_value['year'])>=2) ? ' Years' : ' Year';
+ $year = (abs($ov_value['year'])>=2) ? $ov_value['year'].' Years' : $ov_value['year'].' Year';
$month = '';
if($ov_value['month'] > 0 && (!empty($ov_value['month'])) && isset($ov_value['month'])){
- $month = $ov_value['month'].(abs($ov_value['month'])>=2) ? ' Months' : ' Month';
+ $month = (abs($ov_value['month'])>=2) ? $ov_value['month'].' Months' : $ov_value['month'].' Month';
$month = ' and '.$month;
}
@@ -483,29 +484,29 @@ defined('BASEPATH') or exit('No direct script access allowed');
$netsal = '₹' .' '. MYUTIL::customIndianNumberFormat($ov_value['net_monthly_salary']). '('. MYUTIL::numtowords($ov_value['net_monthly_salary']) .')';
$document_seen = array();
$document_not_seen = array();
- if($ov_value['salary_register_was_seen'] == 'Yes'){
+ if(strtoupper($ov_value['salary_register_was_seen']) == 'YES'){
array_push($document_seen,'Salary Certificate');
}
- else if($ov_value['salary_register_was_seen'] == 'NO' && isset($ov_value['Why_documents_are_not_available'])){
+ else if(strtoupper($ov_value['salary_register_was_seen'])== 'NO' && isset($ov_value['Why_documents_are_not_available'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available']);
}
- if($ov_value['cash_voucher_was_seen'] == 'Yes'){
+ if(strtoupper($ov_value['cash_voucher_was_seen']) == 'YES'){
array_push($document_seen,'Cash Voucher');
}
- else if($ov_value['cash_voucher_was_seen'] == 'NO' && isset($ov_value['Why_documents_are_not_available_cash_voucher'])){
+ else if(strtoupper($ov_value['cash_voucher_was_seen']) == 'NO' && isset($ov_value['Why_documents_are_not_available_cash_voucher'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available_cash_voucher']);
}
- if($ov_value['salary_slip_was_seen'] == 'Yes'){
+ if(strtoupper($ov_value['salary_slip_was_seen']) == 'YES'){
array_push($document_seen,'Salary Slip');
- }else if($ov_value['salary_slip_was_seen'] == 'NO' && isset($ov_value['Why_documents_are_not_available_salary_slip'])){
+ }else if(strtoupper($ov_value['salary_slip_was_seen']) == 'NO' && isset($ov_value['Why_documents_are_not_available_salary_slip'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available_salary_slip']);
}
- if($ov_value['offer_letter_was_seen'] == 'Yes'){
+ if(strtoupper($ov_value['offer_letter_was_seen']) == 'YES'){
array_push($document_seen,'Offer letter');
}else if($ov_value['offer_letter_was_seen'] == 'NO' && isset($ov_value['Why_documents_are_not_available_offer_letter'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available_offer_letter']);
}
- if($ov_value['others_Please_specifys'] == 'Yes' && !empty($ov_value['Others_specify'])){
+ if(strtoupper($ov_value['others_Please_specifys']) == 'YES' && !empty($ov_value['Others_specify'])){
array_push($document_seen,$ov_value['Others_specify']);
}
@@ -516,23 +517,23 @@ defined('BASEPATH') or exit('No direct script access allowed');
- The applicant has served '.$year.$month.' as employee in this firm / company.
';
- if($ov_value['salary_confirmed_by_person_met'] == 'Yes'){
+ if(strtoupper($ov_value['salary_confirmed_by_person_met']) == 'YES'){
echo '- Applicant’s Salary confirmed has been confirmed by the person met. He gets monthly gross salary of
'.$grosssal.' and net monthly salary of '.$netsal.'.
';
}
- if($ov_value['salary_confirmed_by_person_met'] == 'No'){
+ if(strtoupper($ov_value['salary_confirmed_by_person_met']) == 'NO'){
echo '- Applicant’s Salary was not confirmed by the person met.
';
}
echo '- Applicant salary is getting paid Via '.$ov_value['mode_of_getting_salary'].'.
';
- echo '- Employment Document Sighted: '.implode('/', $document_seen).' were seen during Field visit and photographs of same is available in.
';
+ echo '- Employment Document Sighted: '.implode('/', $document_seen).' were seen during Field visit and photographs of same is available in zipped file enclosed with report.
';
if(!empty($document_not_seen)){
echo '- Documents were not sighted during visit because, '.implode('/', $document_seen).'
';
}
echo '- Officer Sighted '.$ov_value['no_of_employees_sighted_by_PD_officer_during_visit'].' employees at the visited premises.';
echo'
- The Business Name board was '.$company_name_sighted.' at the visited address.
- - Business Activity was '.$business_activities.$business_activities_during_visit .'.
';
+ - Business Activity was '.$business_activities.$business_activities_during_visit .'.
';
echo '
';
?>
@@ -563,15 +564,16 @@ defined('BASEPATH') or exit('No direct script access allowed');
}
echo '
';
- echo 'Document to be photographed/scanned:
';
+ // echo 'Document to be photographed/scanned:
';
+ echo 'DOCUMENT TO BE PHOTOGRAPHED/SCANNED:
';
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
echo 'Document Required : ' . $doc_value['doc_name'] . '
';
- echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '
' : 'NO
');
- if ($doc_value['ans'] != 'yes') {
+ echo 'Provided ( Yes / No ) : ' . (strtoupper($doc_value['ans']) == 'YES' ? 'YES, Document available in zipped file enclosed with report' . '
' : 'NO
');
+ if (strtoupper($doc_value['ans']) != 'YES') {
echo 'Reason : ' . $doc_value['reason'];
}
echo '
';
@@ -608,48 +610,19 @@ defined('BASEPATH') or exit('No direct script access allowed');
- VISITING OFFICER`S REMARKS
+ VISITING OFFICER`S REMARKS
- ';
- // echo '
Personal feedback or market intelligence on the case (if any):
';
- // echo '
' . $final_remark_data['market_intelligence'] . '
';
- // echo '
';
- // //echo '
';
- // }
- ?>
- - Customer Behaviour:
-
-
-
✔';
- ?>
-
-
- |
- Polite
-
- |
-
- Rude
-
- |
-
-
- Others*
-
- |
-
-
-
-
-
';
- } ?>
+ ?>
- - PD Officer’s overall assessment:
+ - Final Status of Field Visit:
@@ -750,50 +673,11 @@ defined('BASEPATH') or exit('No direct script access allowed');
-
+
+ Remarks:
+ ' . $pd_officer_final_remark . '' ?>
-
-
- PD officer recommendation is ' . $fo_diplay . '.
';
- if(isset($final_remark_data['recommendation_positive'])){?>
-
- The following key points were considered while arriving at the aforementioned status.
- ";
- foreach ($final_remark_data['recommendation_positive'] as $pos) {
- echo "" . $pos['reason_for_positive'] . "";
- }
- } else if ($negative) {
- echo "";
- foreach ($final_remark_data['recommendation_negative'] as $neg) {
- echo "- " . $neg['reason_for_negative'] . "
";
- }
- } else if ($refer_to_credit) {
- echo "";
- foreach ($final_remark_data['recommendation_refer_to_credit'] as $rtc) {
- echo "- " . $rtc['reason_for_refer_to_credit'] . "
";
- }
- }
- echo "
";
- }
- ?>
-" . $other_command_remark . "";
- }
-
- echo '' . $pd_officer_final_remark . '
'
-?>
Visit Initiated Date | : | ' . $pd_master_details[0]['createdon'] . ' | ';
echo '| Visit Date | : | ' . $pd_master_details[0]['pd_visit_date'] . ' |
';
echo '| Visit Report Date | : | ' . $pd_master_details[0]['pd_report_generated_date'] . ' |
';
- echo '| Visit Initiated by | : | ' . $pd_master_details[0]['branch_name'] . ' Branch |
';
+ echo '| Visit Initiated by | : | ' . $pd_master_details[0]['lender_full_name'] . ' |
';
echo '| Loan Application ID | : | ' . $pd_master_details[0]['lender_applicant_id'] . ' |
';
echo '| Product | : | Home Loan |
';
echo '| Customer Segment | : | Self Employed |
';
@@ -453,10 +453,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
- if ($value['is_person_met'] == 'yes') {
- echo '' . 'Applicant ('.$value['Name_of_the_Person_met'].') was met at the visited address.' . '
';
- }else if ($value['is_person_met'] == 'no') {
- echo '' . '('.$value['Name_of_the_Person'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '
';
+ if (strtoupper($value['is_person_met']) == 'YES') {
+ echo '' . 'Applicant ('.$value['Name_of_the_Person_met_master'].') was met at the visited address.' . '
';
+ }else if (strtoupper($value['is_person_met']) == 'NO') {
+ echo '' . '('.$value['Name_of_the_Person'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit.' . '
';
}
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
echo '' . $general_form['general_remark'] . '
';
@@ -471,11 +471,11 @@ defined('BASEPATH') or exit('No direct script access allowed');
$address_value = $address_form['json'];
if(!empty($address_value)){
echo 'ADDRESS DETAILS:
';
- if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
+ if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
echo '' . '
Visit Initiated Address: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
';
}
- if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
+ if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'NO') {
echo '' . '
Address Where Visit is Initiated: '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
Address Where Visit was actually done: '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
@@ -496,10 +496,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
$residence_visit_data = json_decode($pd_processed_forms[30][0]['processed_json'], true);
$rv_value = $residence_visit_data['json'];
- $year = $rv_value['year'].(abs($rv_value['year'])>=2) ? ' Years' : ' Year';
+ $year = (abs($rv_value['year'])>=2) ? $rv_value['year'].' Years' : $rv_value['year'].' Year';
$month = '';
if($rv_value['month'] > 0 && (!empty($rv_value['month'])) && isset($rv_value['month'])){
- $month = $rv_value['month'].(abs($rv_value['month'])>=2) ? ' Months' : ' Month';
+ $month = (abs($rv_value['month'])>=2) ? $rv_value['month'].' Months' : $rv_value['month'].' Month';
$month = ' and '.$month;
}
$type_of_proof = preg_replace("/_/i", ' ', $rv_value['type_of_proof'] );
@@ -508,10 +508,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '
- The Applicant is residing at the visited address for '.$year.$month.'.
- The Residence is '.ucwords($rv_value['Visited_address_is_rented']).' by the applicant.
';
- if($ov_value['address_proof_shared'] == 'Yes'){
+ if(strtoupper($ov_value['address_proof_shared']) == 'YES'){
echo '- Address Proof: '.$type_of_proof.' was shared during visit.
';
}
- if($ov_value['address_proof_shared'] == 'No'){
+ if(strtoupper($ov_value['address_proof_shared']) == 'NO'){
echo '- Address Proof was not shared during visit.
';
}
// if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
@@ -565,7 +565,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." was not aware of how long the business is in operation.";
}
$ownwers_list = '';
- if(isset($neighbour_value['know_organisation_owner']) && $neighbour_value['know_organisation_owner'] == 'yes'){
+ if(isset($neighbour_value['know_organisation_owner']) && strtoupper($neighbour_value['know_organisation_owner']) == 'YES'){
if(isset($neighbour_value['organisation_owner'])){
// echo "type" . gettype($neighbour_value['organisation_owner']);
for($i = 0; $i < count($neighbour_value['organisation_owner']); $i++)
@@ -670,8 +670,8 @@ defined('BASEPATH') or exit('No direct script access allowed');
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
echo 'Document Required : ' . $doc_value['doc_name'] . '
';
- echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '
' : 'NO
');
- if ($doc_value['ans'] != 'yes') {
+ echo 'Provided ( Yes / No ) : ' . (strtoupper($doc_value['ans']) == 'YES' ? 'YES, Document available in zipped file enclosed with report' . '
' : 'NO
');
+ if (strtoupper($doc_value['ans']) != 'YES') {
echo 'Reason : ' . $doc_value['reason'];
}
echo '
';
@@ -713,44 +713,14 @@ defined('BASEPATH') or exit('No direct script access allowed');
$final_remark = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
$final_remark_data = $final_remark['json'];
//print_r($final_remark_data);
- $polite = null;
- $rude = null;
- $other_behaviour = null;
- $other_behaviour_remarks = null;
- $fair = null;
- $well = null;
- $not = null;
-
+
+
$positive = null;
$negative = null;
$refer_to_credit = null;
$Could_not_verfiy = null;
$fo_diplay = null;
- $other_pd_officer_command = null;
- $other_command_remark = null;
-
- $other_pd_officer_recommandation = null;
- $other_pd_officer_recommandation_remark = null;
- if(isset($final_remark_data['final_custormer_remark_type'])){
- if ($final_remark_data['final_custormer_remark_type'] == 3) {
- $polite = 1;
- } else if ($final_remark_data['final_custormer_remark_type'] == 2) {
- $rude = 1;
- } else if ($final_remark_data['final_custormer_remark_type'] == 1) {
- $other_behaviour = 1;
- $other_behaviour_remarks = $final_remark_data['final_other_customer_behaviour'];
- }
- }
-
- if(isset($final_remark_data['is_service_provided'])){
- if (!strcasecmp($final_remark_data['is_service_provided'], 'fairly_suited')) {
- $fair = 1;
- } else if (!strcasecmp($final_remark_data['is_service_provided'], 'well_suited')) {
- $well = 1;
- } else if (!strcasecmp($final_remark_data['is_service_provided'], 'not_suited')) {
- $not = 1;
- }}
-
+
if(isset($final_remark_data['final_status_of_visit'])){
if ($final_remark_data['final_status_of_visit'] == 'Couldnotverfiy') {
$Could_not_verfiy = 1;
@@ -764,71 +734,16 @@ defined('BASEPATH') or exit('No direct script access allowed');
}}
$pd_officer_final_remark = isset($final_remark_data['common_remarks']) ? $final_remark_data['common_remarks'] : '';
- //if(is_null($other_behaviour)){ echo 'null'; }
- //if(is_null($other_behaviour)){ echo 'null'; }
- //if(is_null($other_behaviour)){ echo 'null'; }
-
?>
- ';
- // echo '
Personal feedback or market intelligence on the case (if any):
';
- // echo '
' . $final_remark_data['market_intelligence'] . '
';
- // echo '
';
- // //echo '
';
- // }
- ?>
- - Customer Behaviour:
-
-
-
✔';
- ?>
-
-
- |
- Polite
-
- |
-
- Rude
-
- |
-
-
- Others*
-
- |
-
-
-
-
-
';
- } ?>
+ ?>
- - PD Officer’s overall assessment:
+ - Final Status of Field Visit:
@@ -856,50 +771,11 @@ defined('BASEPATH') or exit('No direct script access allowed');
-
+
+ - Remarks:
+ ' . $pd_officer_final_remark . '' ?>
-
-
- PD officer recommendation is ' . $fo_diplay . '.
';
- if(isset($final_remark_data['recommendation_positive'])){?>
-
- The following key points were considered while arriving at the aforementioned status.
- ";
- foreach ($final_remark_data['recommendation_positive'] as $pos) {
- echo "- " . $pos['reason_for_positive'] . "
";
- }
- } else if ($negative) {
- echo "