FI Report Sal and RV :; ps

This commit is contained in:
VE10-Sanjeev 2022-10-17 09:59:30 +05:30
parent 4ffc2537c8
commit 5882f4ece1
4 changed files with 298 additions and 274 deletions

View File

@ -2744,14 +2744,16 @@ class PD_Controller extends REST_Controller
$processed_json = $records; $processed_json = $records;
break; break;
case 31: case 31:
$processed_json = $records; $processed_json = GETPROCESSEDJSON::convertCreditManagerQueriesForm($records, $formid);
$records['docs_to_be_sighted'] = isset($processed_json['docs_to_be_sighted']) ? $processed_json['docs_to_be_sighted'] : null;
unset($processed_json['docs_to_be_sighted']);
break; break;
case 32: case 32:
$processed_json = $records; $processed_json = $records;
break; break;
case 33: case 33:
$processed_json = $records; $processed_json = GETPROCESSEDJSON::convertFinalRemarksForm($records, $formid);
break; break;
case 34: case 34:
$processed_json = $records['photograph_details']; $processed_json = $records['photograph_details'];
break; break;

View File

@ -461,27 +461,28 @@ 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 = 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 = 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 = $ov_value['was_the_company_name_board_sighted'] == 'Yes' ? 'seen' : 'not seen';
echo '<ul><li><b>Brief of the Business / Service Model:</b> '.$ov_value['business_brief'].'.</li> echo '<ul><li style="margin: 15px 0;"><b>Brief of the Business / Service Model:</b> '.$ov_value['business_brief'].'.</li>
<li>Visited address is of a <b>'.$ov_value['visited_address_is'].'</b>.</li> <li style="margin: 15px 0;">Visited address is of a <b>'.$ov_value['visited_address_is'].'</b>.</li>
<li>At the time of visit, the officer sighted <b>'.$ov_value['no_of_employees_sighted_by_PD_officer_during_visit'].'</b> employees at the business premises.</li> <li style="margin: 15px 0;">At the time of visit, the officer sighted <b>'.$ov_value['no_of_employees_sighted_by_PD_officer_during_visit'].'</b> employees at the business premises.</li>
<li>The Business Name board was <b>'.$company_name_sighted.'</b> at the visited address.</li>'; <li style="margin: 15px 0;">The Business Name board was <b>'.$company_name_sighted.'</b> at the visited address.</li>';
if($ov_value['do_you_want_to_add_other_documents'] == 'Yes'){ if($ov_value['do_you_want_to_add_other_documents'] == 'Yes'){
echo '<li> <b>'.$ov_value['remarks_others'].'</b> was sighted during visit and pictures are enclosed with the Report.</li>'; echo '<li style="margin: 15px 0;"> <b>'.$ov_value['remarks_others'].'</b> was sighted during visit and pictures are enclosed with the Report.</li>';
} }
if($ov_value['Visited_address_is_rented'] != 'not disclosed '){ if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
echo '<li>The <b>'.$ov_value['visited_address_is'].'</b> is <b>'.$ov_value['Visited_address_is_rented'].'</b>.</li>'; echo '<li style="margin: 15px 0;">The <b>'.$ov_value['visited_address_is'].'</b> is <b>'.$ov_value['Visited_address_is_rented'].'</b>.</li>';
} }
if($ov_value['Visited_address_is_rented'] == 'not disclosed '){ if($ov_value['Visited_address_is_rented'] == 'not disclosed '){
echo '<li>The <b>'.$ov_value['visited_address_is'].'</b> is Rented or Owned is Not Disclosed by the person met.</li>'; echo '<li style="margin: 15px 0;">The <b>'.$ov_value['visited_address_is'].'</b> is Rented or Owned is Not Disclosed by the person met.</li>';
} }
echo '<li>Business Activity was <b>'.$company_name_sighted.'</b> and <b>'.$business_activities_during_visit.'</b> </li>'; echo '<li style="margin: 15px 0;">Business Activity was <b>'.$company_name_sighted.'</b> and <b>'.$business_activities_during_visit.'</b> </li>';
if($ov_value['stock_photograph'] == 'Yes'){ if($ov_value['stock_photograph'] == 'Yes'){
echo '<li>Stock was seen during visit and pictures are enclosed with the Report.</li>'; echo '<li style="margin: 15px 0;">Stock was seen during visit and pictures are enclosed with the Report.</li>';
} }
if($ov_value['stock_photograph'] == 'No'){ if($ov_value['stock_photograph'] == 'No'){
echo '<li>Stock was not seen during visit because <b>'.$ov_value['reason_of_stock_non_availability'].'</b> .</li>'; echo '<li style="margin: 15px 0;">Stock was not seen during visit because <b>'.$ov_value['reason_of_stock_non_availability'].'</b> .</li>';
} }
echo '</ul>'; echo '</ul>';
?> ?>
@ -492,8 +493,15 @@ defined('BASEPATH') or exit('No direct script access allowed');
<?php <?php
$pd_offiecer_status_about_neighbor = ""; $pd_offiecer_status_about_neighbor = "";
$neighbour_details = json_decode($pd_processed_forms[29][0]['json'], true); $neighbour_details = json_decode($pd_processed_forms[32][0]['processed_json'], true);
$neighbour_value = $neighbour_details['json']; $neighbour_value = $neighbour_details['json'];
$neighbourhood_form_common_remarks = $neighbour_value['neighbour_reference_remark'];
if(strcasecmp($neighbour_value['neighbourhood_status'],'could not verify')){
$pd_offiecer_status_about_neighbor = $neighbour_value['neighbourhood_status'];
if(isset($neighbour_value['neighbourhood_list']) && count($neighbour_value['neighbourhood_list'])>0){
$company_name = MYUTIL::findCompanyName($all_company_details,1,1);
}
}
?> ?>
<h3 contenteditable="true">Neighbourhood / Reference Check</h3> <h3 contenteditable="true">Neighbourhood / Reference Check</h3>
<?php <?php
@ -526,13 +534,14 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
$ownwers_list = ''; $ownwers_list = '';
if($neighbour_value['organisation_owner']){ if($neighbour_value['organisation_owner']){
foreach($neighbour_value['organisation_owner'] as $owner) // echo "type" . gettype($neighbour_value['organisation_owner']);
for($i = 0; $i < count($neighbour_value['organisation_owner']); $i++)
{ {
if($owner['id'] != 0) $owner = $neighbour_value['organisation_owner'][$i];
if($owner != 0)
{ {
$title = MYUTIL::applicantTitleName($applicants_details,$owner['id']); $title = MYUTIL::applicantTitleName($applicants_details,$owner);
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner['id'],$applicants_details).' , '; $ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner,$applicants_details).' , ';
} }
else else
{ {
@ -562,8 +571,9 @@ defined('BASEPATH') or exit('No direct script access allowed');
$existNeighRefCheck = array('neighbourhood_name_only' => $neighbourhood_name_only,'neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership); $existNeighRefCheck = array('neighbourhood_name_only' => $neighbourhood_name_only,'neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership);
?> ?>
<?php foreach($existNeighRefCheck as $nkey => $nfValue) { <?php
if(!empty($existNeighRefCheck)){
$nfValue = $existNeighRefCheck;
echo $nfValue['neighbourhood_name_only']; echo $nfValue['neighbourhood_name_only'];
?> ?>
@ -591,6 +601,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';} if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
?> ?>
<!-- ################# neighbourhood/reference check ends #################--> <!-- ################# neighbourhood/reference check ends #################-->
<!-- ################# credit manager specific query #################--> <!-- ################# credit manager specific query #################-->
@ -599,6 +610,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$credit_officier_specific_queries = array(); $credit_officier_specific_queries = array();
if (isset($pd_processed_forms[31])) { if (isset($pd_processed_forms[31])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true); $credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
// print_r($credit_officier_specific_queries);
} }
echo '<br>'; echo '<br>';
@ -664,6 +676,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
<br> <br>
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3> <h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
<?php <?php
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
//print_r($final_remark_data); //print_r($final_remark_data);
$polite = null; $polite = null;
$rude = null; $rude = null;

View File

@ -55,13 +55,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
/*line-height: 35px;*/ /*line-height: 35px;*/
} }
.non-editable { .non-editable {
background-color: #99ff99; background-color: #99ff99;
} }
tfoot { tfoot {
color: #e00201; color: #e00201;
} }
@ -73,35 +70,8 @@ defined('BASEPATH') or exit('No direct script access allowed');
border-collapse: collapse; border-collapse: collapse;
} }
/* ######### Mini Score Card Table Styles######### */
.mini_scorecard_table {
width: 100%;
page-break-inside: avoid;
}
.mini_scorecard_table td,
.mini_scorecard_table th {
page-break-inside: avoid;
}
.mini_scorecard_table th {
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
background-color: #0191ed;
color: white;
page-break-inside: avoid;
}
/* #########End of Mini Score Card Table Styles######### */
/* #########End of Mini Score Card Div Styles######### */ /* #########End of Mini Score Card Div Styles######### */
#rcorners_green { #rcorners_green {
background: #33cc33; background: #33cc33;
padding: 3px; padding: 3px;
width: 75px; width: 75px;
@ -109,7 +79,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
#rcorners_red { #rcorners_red {
background: red; background: red;
padding: 3px; padding: 3px;
width: 75px; width: 75px;
@ -117,7 +86,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
#rcorners_light_green { #rcorners_light_green {
background: #99ff66; background: #99ff66;
padding: 3px; padding: 3px;
width: 75px; width: 75px;
@ -125,7 +93,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
#rcorners_amber { #rcorners_amber {
background: #ff9900; background: #ff9900;
padding: 3px; padding: 3px;
width: 75px; width: 75px;
@ -134,11 +101,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
/* #########End of Mini Score Card DIv Styles######### */ /* #########End of Mini Score Card DIv Styles######### */
/* #########Score Card Table Styles######### */ /* #########Score Card Table Styles######### */
.scorecard_table { .scorecard_table {
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/ /* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
/*font-family: Merriweather;*/ /*font-family: Merriweather;*/
@ -215,7 +178,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
/* #########End of Score Card Table Styles######### */ /* #########End of Score Card Table Styles######### */
#boxstyle2 { #boxstyle2 {
box-sizing: border-box; box-sizing: border-box;
width: 200px; width: 200px;
@ -373,7 +335,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
/*margin: 10px;*/ /*margin: 10px;*/
} }
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -455,149 +416,139 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">General Information: </h3>'; echo '<h3 contenteditable="true">General Information: </h3>';
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true); $general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details; $all_applicant_details = $applicants_details;
?> if ($value['is_person_met'] == 'yes') {
<br> echo '<p>' . 'Applicant <b>('.$value['Name_of_the_Person_met'].')</b> was met at the visited address.' . '</p>';
}else if ($value['is_person_met'] == 'no') {
<?php echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>';
if (1) { }
echo '<p>' . 'Applicant (Prajapati Ranjanaben) was met at the visited address.' . '</p>'; if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
} else if (0) { echo '<p>' . $general_form['general_remark'] . '</p>';
echo '<p>' . '(Prajapati Ranjanaben) (MBBS) was met at the visited address during visit..' . '</p>'; }
} ?>
if ($general_form['general_remark'] != "") {
echo '<p>' . $general_form['general_remark'] . '</p>';
}
?>
<!-- ####################### general information ends ############################--> <!-- ####################### general information ends ############################-->
<!-- ####################### address details ############################--> <!-- ####################### address details ############################-->
<?php <?php
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true); $address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$address_value = $address_form['json'];
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'], true); if(!empty($address_value)){
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_images = $pd_images[5]; if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
echo '<p>' . 'If Yes is selected in “Is this address where Visit is being done? then, echo '<p>' . '
<b>Visit Initiated Address:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'. </p>';
Visit Initiated Address: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445 }
if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
If No is selected in “Is this address where visit is being done? then, echo '<p>' . '
<b>Address Where Visit is Initiated:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
Address Where Visit is Initiated: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445 <b>Address Where Visit was actually done:</b> '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
Address Where Visit was actually done: C-68, Hemant Vallabh Park, Vatva Ahemadabad-382445 <b>Reason for change in Visit address:</b> '.$address_value['end_use'].'.</p>';
Reason for change in Visit address: (Entered reason for change in address should appear here). }
echo '<p>' . 'The Field Visit was done at <b>'.$address_value['address_type_master'].'</b> of the loan applicants. </p>';
The Field Visit was done at Residence/Office/Shop of the loan applicants. The Residence/Shop/Office is located in a Residential/Industrial Area and the estimated area of the Residence/Shop/Office is 700 Square Feet. The location was Very Easy to locate & Reach. As Per Officer, the Residence/Shop/Office is situated in a Good/Poor Locality. ' . '</p>'; }
?> ?>
<div id="page_break"></div> <div id="page_break"></div>
<!-- ####################### address details ends ############################--> <!-- ####################### address details ends ############################-->
<!-- ####################### office visit DI ############################--> <!-- ####################### office visit DI ############################-->
<?php <?php
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">VISIT DETAILS: </h3>'; echo '<h3 contenteditable="true">Visit Details: </h3>';
$Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true); $Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true);
$ov_value = $Office_visit_data['json'];
// print_r($ov_value);
echo '<p>' . '
Brief of the Business / Service Model: (Entered details about business in Free text field should appear here). $company_name_sighted = $ov_value['was_the_company_name_board_sighted'] == 'Yes' ? 'seen' : 'not seen';
Visited address is of a Godown/Office/Factory. $business_activities = $ov_value['Was_any_business_activities_observed_during_visit'] == 'Yes' ? 'seen' : 'not seen';
At the time of visit, the officer sighted 10 employees at the business premises. $business_activities_during_visit = '';
The Business Name board was seen/not seen at the visited address. if($ov_value['Was_any_business_activities_observed_during_visit'] == 'Yes'){
(Name of business documents selected/Entered) was sighted during visit and pictures are enclosed with the Report. $business_activities_during_visit = implode(', ', $ov_value['If_yes_choose_one']);
The Godown/Office/Factory is Rented/Owned. $business_activities_during_visit = preg_replace("/_/i", ' ', $business_activities_during_visit );
(If Not Disclosed is selected then), $business_activities_during_visit = ' and '.ucwords($business_activities_during_visit);
The Godown/Office/Factory is Rented or Owned is Not Disclosed by the person met. if(isset($ov_value['Others_Please_specify'])){ $business_activities_during_visit = $business_activities_during_visit.', '.$ov_value['Others_Please_specify'];}
Business Activity was seen/ was not seen and (Selected dropdowns or entered remarks) }
Stock was seen during visit and pictures are enclosed with the Report.
(If No is selected then)
Stock was not seen during visit because (Entered reason in remark).' . '</p>'; $year = $ov_value['year'].(abs($ov_value['year'])>=2) ? ' Years' : ' 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 = ' and '.$month;
}
$grosssal = '<span style="font-family: DejaVu Sans; sans-serif;font-size:10px;word-wrap:break-word">₹</span>' .' '. MYUTIL::customIndianNumberFormat($ov_value['gross_monthly_salary']). '<span style="font-size:10px;">('. MYUTIL::numtowords($ov_value['gross_monthly_salary']) .')</span>';
$netsal = '<span style="font-family: DejaVu Sans; sans-serif;font-size:10px;word-wrap:break-word">₹</span>' .' '. MYUTIL::customIndianNumberFormat($ov_value['net_monthly_salary']). '<span style="font-size:10px;">('. MYUTIL::numtowords($ov_value['net_monthly_salary']) .')</span>';
$document_seen = array();
$document_not_seen = array();
if($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'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available']);
}
if($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'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available_cash_voucher']);
}
if($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'])){
array_push($document_not_seen,$ov_value['Why_documents_are_not_available_salary_slip']);
}
if($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'])){
array_push($document_seen,$ov_value['Others_specify']);
}
echo '<ul><li style="margin: 15px 0;"><b>Employer Profile:</b> '.$ov_value['employer_brief'].'.</li>
<li style="margin: 15px 0;">The applicant has served <b> '.$year.$month.'</b> as employee in this firm / company.</li>';
if($ov_value['salary_confirmed_by_person_met'] == 'Yes'){
echo '<li style="margin: 15px 0;">Applicants Salary confirmed has been confirmed by the person met. He gets monthly gross salary of
'.$grosssal.' and net monthly salary of '.$netsal.'.</li> ';
}
if($ov_value['salary_confirmed_by_person_met'] == 'No'){
echo '<li style="margin: 15px 0;">Applicants Salary <b> was not confirmed </b> by the person met.</li> ';
}
echo '<li style="margin: 15px 0;">Applicant salary is getting paid Via <b>'.$ov_value['mode_of_getting_salary'].'</b>.</li> ';
echo '<li style="margin: 15px 0;">Employment Document Sighted: <b>'.implode('/', $document_seen).'</b> were seen during Field visit and photographs of same is available in.</li> ';
if(!empty($document_not_seen)){
echo '<li style="margin: 15px 0;">Documents were not sighted during visit because, <b>'.implode('/', $document_seen).'</b></li> ';
}
echo '<li style="margin: 15px 0;">Officer Sighted '.$ov_value['no_of_employees_sighted_by_PD_officer_during_visit'].' employees at the visited premises.';
echo'<li style="margin: 15px 0;">The Business Name board was <b>'.$company_name_sighted.'</b> at the visited address.</li>
<li style="margin: 15px 0;">Business Activity was <b>'.$business_activities.$business_activities_during_visit .'.</li>';
echo '</ul>';
?> ?>
<div id="page_break"></div> <div id="page_break"></div>
<!-- ####################### office visit DI ends ############################--> <!-- ####################### office visit DI ends ############################-->
<!-- ################# neighbourhood/reference check #################-->
<!-- <?php
$existNeighRefCheck = array();
$pd_offiecer_status_about_neighbor = "";
foreach ($pd_processed_forms[19] as $rowKey => $nrcRow) {
$neighbourRefRow = json_decode($nrcRow['processed_json'], true);
//print_r($applicants_details);
//print_r($neighbourRefRow);die();
$neighbourhood_form_common_remarks = $neighbourRefRow['neighbour_reference_remark'];
if (strcasecmp($neighbourRefRow['neighbourhood_status'], 'could not verify')) {
$pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status'];
if (count($neighbourRefRow['neighbourhood_list']) > 0) {
$company_name = MYUTIL::findCompanyName($all_company_details, 1, 1);
$existNeighRefCheck = NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name, $neighbourRefRow['neighbourhood_list'], $pd_master_details[0], $applicants_details); //applicants_details comes from controller
}
}
// if(&& count($neighbourRefRow['referencecheck_list'])>0){
// $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]);
// }
}
?>
<h3 contenteditable="true">Neighbourhood / Reference Check</h3>
<?php
//echo $pd_offiecer_status_about_neighbor;
if (count($existNeighRefCheck) > 0) {
// print_r($existNeighRefCheck);die();
?>
<?php foreach ($existNeighRefCheck as $nkey => $nfValue) {
echo $nfValue['neighbourhood_name_only'];
?>
<ul>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?>
</ul>
<?php } ?>
<li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor; ?>.</span></li>
</li>
<?php
} else { ?>
<!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> -->
<!-- <p>Neighbour Check was not possible due to Could not verify</p> --
<p>Status of the check: could not verify.<p>
<?php
}
if ($neighbourhood_form_common_remarks != "") {
echo '<p>' . $neighbourhood_form_common_remarks . '</p>';
}
?>
-->
<!-- ################# neighbourhood/reference check ends #################-->
<!-- ################# credit manager specific query #################--> <!-- ################# credit manager specific query #################-->
<?php <?php
$credit_officier_specific_queries = array(); $credit_officier_specific_queries = array();
if (isset($pd_processed_forms[24])) { if (isset($pd_processed_forms[31])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[24][0]['processed_json'], true); $credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
} }
// echo 'CREDIT ********************';
// print_r($data['pd_processed_forms'][24]);
//print_r($credit_officier_specific_queries);
// if(count($credit_officier_specific_queries))
// {
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>'; echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>';
//echo '<br>';
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) { if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
@ -612,7 +563,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>'; echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>';
//
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) { if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
@ -650,10 +601,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
} }
//}
?> ?>
<!-- ################# credit manager specific query ends#################--> <!-- ################# credit manager specific query ends#################-->
<!-- ################# final remarks #################--> <!-- ################# final remarks #################-->
@ -661,6 +609,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
<br> <br>
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3> <h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
<?php <?php
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
//print_r($final_remark_data); //print_r($final_remark_data);
$polite = null; $polite = null;
$rude = null; $rude = null;
@ -712,6 +661,8 @@ defined('BASEPATH') or exit('No direct script access allowed');
} }
$pd_officer_final_remark = isset($final_remark_data['final_form_remarks']) ? $final_remark_data['final_form_remarks'] : ''; $pd_officer_final_remark = isset($final_remark_data['final_form_remarks']) ? $final_remark_data['final_form_remarks'] : '';
//if(is_null($other_behaviour)){ echo 'null'; }
//if(is_null($other_behaviour)){ echo 'null'; }
//if(is_null($other_behaviour)){ echo 'null'; } //if(is_null($other_behaviour)){ echo 'null'; }
?> ?>

View File

@ -451,146 +451,204 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">General Information: </h3>'; echo '<h3 contenteditable="true">General Information: </h3>';
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true); $general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details; $all_applicant_details = $applicants_details;
?> if ($value['is_person_met'] == 'yes') {
<br> echo '<p>' . 'Applicant <b>('.$value['Name_of_the_Person_met'].')</b> was met at the visited address.' . '</p>';
}else if ($value['is_person_met'] == 'no') {
<?php echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>';
if (1) { }
echo '<p>' . 'Applicant (Prajapati Ranjanaben) was met at the visited address.' . '</p>'; if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
} else if (0) { echo '<p>' . $general_form['general_remark'] . '</p>';
echo '<p>' . '(Prajapati Ranjanaben) (MBBS) was met at the visited address during visit..' . '</p>'; }
} ?>
if ($general_form['general_remark'] != "") {
echo '<p>' . $general_form['general_remark'] . '</p>';
}
?>
<!-- ####################### general information ends ############################--> <!-- ####################### general information ends ############################-->
<!-- ####################### address details ############################--> <!-- ####################### address details ############################-->
<?php <?php
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true); $address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$address_value = $address_form['json'];
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'], true); if(!empty($address_value)){
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_images = $pd_images[5]; if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
echo '<p>' . 'If Yes is selected in “Is this address where Visit is being done? then, echo '<p>' . '
<b>Visit Initiated Address:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'. </p>';
Visit Initiated Address: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445 }
if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
If No is selected in “Is this address where visit is being done? then, echo '<p>' . '
<b>Address Where Visit is Initiated:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
Address Where Visit is Initiated: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445 <b>Address Where Visit was actually done:</b> '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
Address Where Visit was actually done: C-68, Hemant Vallabh Park, Vatva Ahemadabad-382445 <b>Reason for change in Visit address:</b> '.$address_value['end_use'].'.</p>';
Reason for change in Visit address: (Entered reason for change in address should appear here). }
echo '<p>' . 'The Field Visit was done at <b>'.$address_value['address_type_master'].'</b> of the loan applicants. The <b>'.$address_value['address_type_master'].'</b> is located in a <b>'.$address_value['locality_master'].'</b> and the estimated area of the <b>'.$address_value['address_type_master'].'</b> is <b>'.$address_value['uom_master'].'</b>. The location was <b>'.$address_value['Approach_to_PD_location'].'</b>. As Per Officer, the <b>'.$address_value['address_type_master'].'</b> is situated in a <b>'.$address_value['comment_locality_master'].'</b> Locality. ' . '</p>';
The Field Visit was done at Residence/Office/Shop of the loan applicants. The Residence/Shop/Office is located in a Residential/Industrial Area and the estimated area of the Residence/Shop/Office is 700 Square Feet. The location was Very Easy to locate & Reach. As Per Officer, the Residence/Shop/Office is situated in a Good/Poor Locality. ' . '</p>'; }
?> ?>
<div id="page_break"></div> <div id="page_break"></div>
<!-- ####################### address details ends ############################--> <!-- ####################### address details ends ############################-->
<!-- ####################### office visit DI ############################--> <!-- ####################### office visit DI ############################-->
<?php <?php
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">VISIT DETAILS: </h3>'; echo '<h3 contenteditable="true">VISIT DETAILS: </h3>';
$Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true); $residence_visit_data = json_decode($pd_processed_forms[30][0]['processed_json'], true);
$rv_value = $residence_visit_data['json'];
echo '<p>' . ' $year = $rv_value['year'].(abs($rv_value['year'])>=2) ? ' Years' : ' 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 = ' and '.$month;
}
$type_of_proof = preg_replace("/_/i", ' ', $rv_value['type_of_proof'] );
$type_of_proof = ucwords($type_of_proof);
The Applicant is residing at the visited address for 10 Years and 10 Month. echo '<ul><li style="margin: 15px 0;">The Applicant is residing at the visited address for '.$year.$month.'.</li>
The Residence is Rented/Owned by the applicant. <li style="margin: 15px 0;">The Residence is <b>'.ucwords($rv_value['Visited_address_is_rented']).'</b> by the applicant.</li>';
IF Yes selected in Address Proof Shared? Then, if($ov_value['address_proof_shared'] == 'Yes'){
Address Proof: Electricity Bill / Adhar card / Rent Agreement was shared during visit. echo '<li style="margin: 15px 0;"> Address Proof: <b>'.$type_of_proof.'</b> was shared during visit.</li>';
}
IF Yes selected in Address Proof Shared? Then, if($ov_value['address_proof_shared'] == 'No'){
Address Proof was not shared during visit.' . '</p>'; echo '<li style="margin: 15px 0;"> Address Proof <b> was not shared </b> during visit.</li>';
}
// if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
// echo '<li style="margin: 15px 0;">The <b>'.$ov_value['visited_address_is'].'</b> is <b>'.$ov_value['Visited_address_is_rented'].'</b>.</li>';
// }
echo '</ul>';
?> ?>
<div id="page_break"></div> <div id="page_break"></div>
<!-- ####################### office visit DI ends ############################--> <!-- ####################### office visit DI ends ############################-->
<!-- ################# neighbourhood/reference check #################--> <!-- ################# neighbourhood/reference check #################-->
<!-- <?php <?php
$existNeighRefCheck = array();
$pd_offiecer_status_about_neighbor = "";
foreach ($pd_processed_forms[19] as $rowKey => $nrcRow) {
$neighbourRefRow = json_decode($nrcRow['processed_json'], true);
//print_r($applicants_details);
//print_r($neighbourRefRow);die();
$neighbourhood_form_common_remarks = $neighbourRefRow['neighbour_reference_remark'];
if (strcasecmp($neighbourRefRow['neighbourhood_status'], 'could not verify')) {
$pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status'];
if (count($neighbourRefRow['neighbourhood_list']) > 0) {
$company_name = MYUTIL::findCompanyName($all_company_details, 1, 1);
$existNeighRefCheck = NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name, $neighbourRefRow['neighbourhood_list'], $pd_master_details[0], $applicants_details); //applicants_details comes from controller $pd_offiecer_status_about_neighbor = "";
} $neighbour_details = json_decode($pd_processed_forms[32][0]['processed_json'], true);
$neighbour_value = $neighbour_details['json'];
$neighbourhood_form_common_remarks = $neighbour_value['neighbour_reference_remark'];
if(strcasecmp($neighbour_value['neighbourhood_status'],'could not verify')){
$pd_offiecer_status_about_neighbor = $neighbour_value['neighbourhood_status'];
if(isset($neighbour_value['neighbourhood_list']) && count($neighbour_value['neighbourhood_list'])>0){
$company_name = MYUTIL::findCompanyName($all_company_details,1,1);
}
} }
// if(&& count($neighbourRefRow['referencecheck_list'])>0){ ?>
// $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]); <h3 contenteditable="true">Neighbourhood / Reference Check</h3>
// }
}
?>
<h3 contenteditable="true">Neighbourhood / Reference Check</h3>
<?php <?php
//echo $pd_offiecer_status_about_neighbor; //echo $pd_offiecer_status_about_neighbor;
if (count($existNeighRefCheck) > 0) { if(count($neighbour_value)>0){
// print_r($existNeighRefCheck);die();
$neighbourhood_name='Neighbour Check was done with ';
$neighbourhood_name.= $neighbour_value['neighbourhood_name'].'.';
$neighbourhood_do_know = null;
$neighbourhood_business_running_yr = null;
$ownership = null;
$neighbourhood_name_only = $neighbour_value['neighbourhood_name'];
if(strtoupper($neighbour_value['do_know'])=='YES'){
$neighbourhood_do_know = $neighbour_value['neighbourhood_name']." knows about applicants and their business.";
} else if(strtoupper($neighbour_value['do_know'])=='NO'){
$neighbourhood_do_know = $neighbour_value['neighbourhood_name']." did not know about the applicant or their business.";
}
if($neighbour_value['how_long_do_know_in_year'] || $neighbour_value['how_long_do_know_in_month'])
{
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." confirmed that the business has been in operation for ";
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_year'] == 1) ? $neighbour_value['how_long_do_know_in_year']." year" : (($neighbour_value['how_long_do_know_in_year'] > 1) ? $neighbour_value['how_long_do_know_in_year']." years" : "");
$neighbour_value['how_long_do_know_in_year'] && $neighbour_value['how_long_do_know_in_month'] ? $neighbourhood_business_running_yr .= ' and ':'';
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_month'] == 1) ? $neighbour_value['how_long_do_know_in_month']." month" : (($neighbour_value['how_long_do_know_in_month'] > 1) ? $neighbour_value['how_long_do_know_in_month']." months" : "");
$neighbourhood_business_running_yr .= '.';
}
else
{
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." was not aware of how long the business is in operation.";
}
$ownwers_list = '';
if($neighbour_value['organisation_owner']){
// echo "type" . gettype($neighbour_value['organisation_owner']);
for($i = 0; $i < count($neighbour_value['organisation_owner']); $i++)
{
$owner = $neighbour_value['organisation_owner'][$i];
if($owner != 0)
{
$title = MYUTIL::applicantTitleName($applicants_details,$owner);
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner,$applicants_details).' , ';
}
else
{
$ownwers_list .= ' '.$neighbour_value['other_organisation_owner'].' , ';
}
}
//echo $ownwers_list;
//$ownwers_list = substr_replace($ownwers_list,'', strrpos(-$ownwers_list,','),1);
//echo $ownwers_list;
//echo $ownwers_list;echo "**********";
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
if(strrpos($ownwers_list,','))
{
$ownwers_list = substr_replace($ownwers_list,' and ', strrpos($ownwers_list,','),1);
}
$grammer1 = count($neighbour_value['organisation_owner']) > 1 ? ' are ': ' is ';
$grammer2 = count($neighbour_value['organisation_owner']) > 1 ? 'owners': 'owner';
$ownership = 'As per '.$neighbour_value['neighbourhood_name'].' the '.$grammer2 .' of '.$company_name.$grammer1.$ownwers_list.'.';
}else
{
$ownership = $neighbour_value['neighbourhood_name']." was not aware of the business ownership.";
}
$existNeighRefCheck = array('neighbourhood_name_only' => $neighbourhood_name_only,'neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership);
?> ?>
<?php foreach ($existNeighRefCheck as $nkey => $nfValue) { <?php
if(!empty($existNeighRefCheck)){
echo $nfValue['neighbourhood_name_only']; $nfValue = $existNeighRefCheck;
echo $nfValue['neighbourhood_name_only'];
?> ?>
<ul> <ul>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li> <li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li> <li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li> <li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?> <li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?></li>
</ul> </ul>
<?php } ?> <?php }?>
<li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor; ?>.</span></li> <li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor;?>.</span></li>
</li> </li>
<?php <?php
} else { ?> }
else{?>
<!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> --> <!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> -->
<!-- <p>Neighbour Check was not possible due to Could not verify</p> -- <!-- <p>Neighbour Check was not possible due to Could not verify</p> -->
<p>Status of the check: could not verify.<p> <p>Status of the check: could not verify.</p>
<?php <?php
} }
if ($neighbourhood_form_common_remarks != "") { if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
echo '<p>' . $neighbourhood_form_common_remarks . '</p>';
}
?> ?>
-->
<!-- ################# neighbourhood/reference check ends #################--> <!-- ################# neighbourhood/reference check ends #################-->
<!-- ################# credit manager specific query #################--> <!-- ################# credit manager specific query #################-->
<?php <?php
$credit_officier_specific_queries = array(); $credit_officier_specific_queries = array();
if (isset($pd_processed_forms[24])) { if (isset($pd_processed_forms[31])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[24][0]['processed_json'], true); $credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
// print_r($credit_officier_specific_queries);
} }
// echo 'CREDIT ********************';
// print_r($data['pd_processed_forms'][24]);
//print_r($credit_officier_specific_queries);
// if(count($credit_officier_specific_queries))
// {
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>'; echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>';
//echo '<br>';
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) { if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
@ -605,7 +663,7 @@ IF Yes selected in Address Proof Shared? Then,
echo '<br>'; echo '<br>';
echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>'; echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>';
//
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) { if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
@ -643,10 +701,7 @@ IF Yes selected in Address Proof Shared? Then,
} }
} }
//}
?> ?>
<!-- ################# credit manager specific query ends#################--> <!-- ################# credit manager specific query ends#################-->
<!-- ################# final remarks #################--> <!-- ################# final remarks #################-->
@ -654,6 +709,7 @@ IF Yes selected in Address Proof Shared? Then,
<br> <br>
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3> <h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
<?php <?php
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
//print_r($final_remark_data); //print_r($final_remark_data);
$polite = null; $polite = null;
$rude = null; $rude = null;
@ -705,6 +761,8 @@ IF Yes selected in Address Proof Shared? Then,
} }
$pd_officer_final_remark = isset($final_remark_data['final_form_remarks']) ? $final_remark_data['final_form_remarks'] : ''; $pd_officer_final_remark = isset($final_remark_data['final_form_remarks']) ? $final_remark_data['final_form_remarks'] : '';
//if(is_null($other_behaviour)){ echo 'null'; }
//if(is_null($other_behaviour)){ echo 'null'; }
//if(is_null($other_behaviour)){ echo 'null'; } //if(is_null($other_behaviour)){ echo 'null'; }
?> ?>
@ -955,7 +1013,7 @@ if (count($pd_images['common_images'])) {
echo '</tbody></table>'; echo '</tbody></table>';
} }
?> ?>
<!-- ################# common images #################--> <!-- ################# common images #################-->s
<!-- ########################### End-disclaimer start ######################################### --> <!-- ########################### End-disclaimer start ######################################### -->
<?php <?php