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;
break;
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;
case 32:
$processed_json = $records;
break;
case 33:
$processed_json = $records;
break;
$processed_json = GETPROCESSEDJSON::convertFinalRemarksForm($records, $formid);
break;
case 34:
$processed_json = $records['photograph_details'];
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 = 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';
echo '<ul><li><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>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>';
echo '<ul><li style="margin: 15px 0;"><b>Brief of the Business / Service Model:</b> '.$ov_value['business_brief'].'.</li>
<li style="margin: 15px 0;">Visited address is of a <b>'.$ov_value['visited_address_is'].'</b>.</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 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'){
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 '){
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 '){
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'){
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'){
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>';
?>
@ -492,8 +493,15 @@ defined('BASEPATH') or exit('No direct script access allowed');
<?php
$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'];
$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>
<?php
@ -526,13 +534,14 @@ defined('BASEPATH') or exit('No direct script access allowed');
}
$ownwers_list = '';
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']);
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner['id'],$applicants_details).' , ';
$title = MYUTIL::applicantTitleName($applicants_details,$owner);
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner,$applicants_details).' , ';
}
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);
?>
<?php foreach($existNeighRefCheck as $nkey => $nfValue) {
<?php
if(!empty($existNeighRefCheck)){
$nfValue = $existNeighRefCheck;
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>';}
?>
<!-- ################# neighbourhood/reference check ends #################-->
<!-- ################# credit manager specific query #################-->
@ -599,6 +610,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$credit_officier_specific_queries = array();
if (isset($pd_processed_forms[31])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
// print_r($credit_officier_specific_queries);
}
echo '<br>';
@ -664,6 +676,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
<br>
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
<?php
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
//print_r($final_remark_data);
$polite = null;
$rude = null;

View File

@ -55,13 +55,10 @@ defined('BASEPATH') or exit('No direct script access allowed');
/*line-height: 35px;*/
}
.non-editable {
background-color: #99ff99;
}
tfoot {
color: #e00201;
}
@ -73,35 +70,8 @@ defined('BASEPATH') or exit('No direct script access allowed');
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######### */
#rcorners_green {
background: #33cc33;
padding: 3px;
width: 75px;
@ -109,7 +79,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
}
#rcorners_red {
background: red;
padding: 3px;
width: 75px;
@ -117,7 +86,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
}
#rcorners_light_green {
background: #99ff66;
padding: 3px;
width: 75px;
@ -125,7 +93,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
}
#rcorners_amber {
background: #ff9900;
padding: 3px;
width: 75px;
@ -134,11 +101,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
/* #########End of Mini Score Card DIv Styles######### */
/* #########Score Card Table Styles######### */
.scorecard_table {
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
/*font-family: Merriweather;*/
@ -215,7 +178,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
/* #########End of Score Card Table Styles######### */
#boxstyle2 {
box-sizing: border-box;
width: 200px;
@ -373,7 +335,6 @@ defined('BASEPATH') or exit('No direct script access allowed');
/*margin: 10px;*/
}
/* ######### TOOLTIP CSS END ######### */
</style>
<script type="text/javascript">
@ -455,149 +416,139 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>';
echo '<h3 contenteditable="true">General Information: </h3>';
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
?>
<br>
<?php
if (1) {
echo '<p>' . 'Applicant (Prajapati Ranjanaben) was met at the visited address.' . '</p>';
} else if (0) {
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>';
}
?>
if ($value['is_person_met'] == 'yes') {
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') {
echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>';
}
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
echo '<p>' . $general_form['general_remark'] . '</p>';
}
?>
<!-- ####################### general information ends ############################-->
<!-- ####################### address details ############################-->
<?php
echo '<br>';
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'], true);
$address_images = $pd_images[5];
echo '<p>' . 'If Yes is selected in “Is this address where Visit is being done? then,
Visit Initiated Address: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445
If No is selected in “Is this address where visit is being done? then,
Address Where Visit is Initiated: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445
Address Where Visit was actually done: C-68, Hemant Vallabh Park, Vatva Ahemadabad-382445
Reason for change in Visit address: (Entered reason for change in address should appear here).
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>';
$address_value = $address_form['json'];
if(!empty($address_value)){
echo '<h3 contenteditable="true">Address Details: </h3>';
if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
echo '<p>' . '
<b>Visit Initiated Address:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'. </p>';
}
if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
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'].'.
<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'].'.
<b>Reason for change in Visit address:</b> '.$address_value['end_use'].'.</p>';
}
echo '<p>' . 'The Field Visit was done at <b>'.$address_value['address_type_master'].'</b> of the loan applicants. </p>';
}
?>
<div id="page_break"></div>
<!-- ####################### address details ends ############################-->
<!-- ####################### office visit DI ############################-->
<?php
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);
$ov_value = $Office_visit_data['json'];
// 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';
$business_activities_during_visit = '';
if($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'];}
}
$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 '<p>' . '
Brief of the Business / Service Model: (Entered details about business in Free text field should appear here).
Visited address is of a Godown/Office/Factory.
At the time of visit, the officer sighted 10 employees at the business premises.
The Business Name board was seen/not seen at the visited address.
(Name of business documents selected/Entered) was sighted during visit and pictures are enclosed with the Report.
The Godown/Office/Factory is Rented/Owned.
(If Not Disclosed is selected then),
The Godown/Office/Factory is Rented or Owned is Not Disclosed by the person met.
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>';
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>
<!-- ####################### 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 #################-->
<?php
$credit_officier_specific_queries = array();
if (isset($pd_processed_forms[24])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[24][0]['processed_json'], true);
if (isset($pd_processed_forms[31])) {
$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 '<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'])) {
@ -612,7 +563,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>';
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'])) {
@ -650,10 +601,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
}
}
//}
?>
<!-- ################# credit manager specific query ends#################-->
<!-- ################# final remarks #################-->
@ -661,6 +609,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
<br>
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
<?php
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
//print_r($final_remark_data);
$polite = 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'] : '';
//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 '<h3 contenteditable="true">General Information: </h3>';
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
?>
<br>
<?php
if (1) {
echo '<p>' . 'Applicant (Prajapati Ranjanaben) was met at the visited address.' . '</p>';
} else if (0) {
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>';
}
?>
if ($value['is_person_met'] == 'yes') {
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') {
echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>';
}
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
echo '<p>' . $general_form['general_remark'] . '</p>';
}
?>
<!-- ####################### general information ends ############################-->
<!-- ####################### address details ############################-->
<?php
echo '<br>';
echo '<h3 contenteditable="true">Address Details: </h3>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'], true);
$address_images = $pd_images[5];
echo '<p>' . 'If Yes is selected in “Is this address where Visit is being done? then,
Visit Initiated Address: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445
If No is selected in “Is this address where visit is being done? then,
Address Where Visit is Initiated: B-508, Yash F Loora, Near Vallabh Park, Vatva Ahemadabad-382445
Address Where Visit was actually done: C-68, Hemant Vallabh Park, Vatva Ahemadabad-382445
Reason for change in Visit address: (Entered reason for change in address should appear here).
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>';
$address_value = $address_form['json'];
if(!empty($address_value)){
echo '<h3 contenteditable="true">Address Details: </h3>';
if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
echo '<p>' . '
<b>Visit Initiated Address:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'. </p>';
}
if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
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'].'.
<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'].'.
<b>Reason for change in Visit address:</b> '.$address_value['end_use'].'.</p>';
}
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>';
}
?>
<div id="page_break"></div>
<!-- ####################### address details ends ############################-->
<!-- ####################### office visit DI ############################-->
<?php
echo '<br>';
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'];
$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);
echo '<ul><li style="margin: 15px 0;">The Applicant is residing at the visited address for '.$year.$month.'.</li>
<li style="margin: 15px 0;">The Residence is <b>'.ucwords($rv_value['Visited_address_is_rented']).'</b> by the applicant.</li>';
echo '<p>' . '
The Applicant is residing at the visited address for 10 Years and 10 Month.
The Residence is Rented/Owned by the applicant.
IF Yes selected in Address Proof Shared? Then,
Address Proof: Electricity Bill / Adhar card / Rent Agreement was shared during visit.
IF Yes selected in Address Proof Shared? Then,
Address Proof was not shared during visit.' . '</p>';
if($ov_value['address_proof_shared'] == 'Yes'){
echo '<li style="margin: 15px 0;"> Address Proof: <b>'.$type_of_proof.'</b> was shared during visit.</li>';
}
if($ov_value['address_proof_shared'] == 'No'){
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>
<!-- ####################### 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]);
// }
}
?>
<?php
<h3 contenteditable="true">Neighbourhood / Reference Check</h3>
<?php
$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);
}
}
?>
<h3 contenteditable="true">Neighbourhood / Reference Check</h3>
<?php
//echo $pd_offiecer_status_about_neighbor;
if (count($existNeighRefCheck) > 0) {
// print_r($existNeighRefCheck);die();
if(count($neighbour_value)>0){
$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) {
echo $nfValue['neighbourhood_name_only'];
<?php
if(!empty($existNeighRefCheck)){
$nfValue = $existNeighRefCheck;
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']; ?>
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?></li>
</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>
<?php
} else { ?>
<?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>
<!-- <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>';
<?php
}
if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
?>
-->
<!-- ################# neighbourhood/reference check ends #################-->
<!-- ################# credit manager specific query #################-->
<?php
$credit_officier_specific_queries = array();
if (isset($pd_processed_forms[24])) {
$credit_officier_specific_queries = json_decode($pd_processed_forms[24][0]['processed_json'], true);
if (isset($pd_processed_forms[31])) {
$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 '<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'])) {
@ -605,7 +663,7 @@ IF Yes selected in Address Proof Shared? Then,
echo '<br>';
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'])) {
@ -643,10 +701,7 @@ IF Yes selected in Address Proof Shared? Then,
}
}
//}
?>
<!-- ################# credit manager specific query ends#################-->
<!-- ################# final remarks #################-->
@ -654,6 +709,7 @@ IF Yes selected in Address Proof Shared? Then,
<br>
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
<?php
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
//print_r($final_remark_data);
$polite = 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'] : '';
//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>';
}
?>
<!-- ################# common images #################-->
<!-- ################# common images #################-->s
<!-- ########################### End-disclaimer start ######################################### -->
<?php