PD SCORE IND CHANGED

This commit is contained in:
velz 2019-06-04 22:04:01 +05:30
parent 7025d9ad9c
commit cb035ba2e5
6 changed files with 197 additions and 43 deletions

View File

@ -2347,7 +2347,7 @@ class PD_Controller extends REST_Controller {
} }
} }
//die(); // die();
/*****End of Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA*******/ /*****End of Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA*******/
unset($records['pdid']); unset($records['pdid']);
@ -4024,11 +4024,12 @@ class PD_Controller extends REST_Controller {
$fk_createdby = $records['fk_createdby']; $fk_createdby = $records['fk_createdby'];
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid); $data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
$data['pd_master_details'][0]['pd_report_generated_date'] = date('d/m/Y g:i:s A');
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid); $data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid); $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly($pdid); $data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly($pdid);
$data['pd_score'] = $this->calculateScore($pdid); $data['pd_score'] = $this->calculateScore($pdid);
$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] ); //$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid); $data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],1) : 0; $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],1) : 0;
//echo $score_for_chart; //echo $score_for_chart;
@ -4933,11 +4934,27 @@ class PD_Controller extends REST_Controller {
public function codeigniterViewTest_post() public function codeigniterViewTest_post()
{ {
// $newstring = '<span class="tooltip">Easy to locate & Reach<span class="tooltiptext">Address Form - Approach to PD location </span></span>.';
// //echo $newstring ;
// $start_pos = strpos($newstring,'<span class="tooltiptext">');
// $end_pos = strpos($newstring, '</span>', strpos($newstring,'<span class="tooltiptext">'));
// $end_pos = $end_pos + 14;
// //echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-';
// $newstring = substr_replace($newstring,'',$start_pos,($end_pos - $start_pos));
// $newstring = substr_replace($newstring,'',strpos($newstring,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
// echo $newstring;
// die();
$records = $this->post('records'); $records = $this->post('records');
$pdid = $records['pd_id']; $pdid = $records['pd_id'];
echo $pdid;die();
//PDALERTS::pdnotification($pdid);die(); //PDALERTS::pdnotification($pdid);die();
$is_regenerate = 0; $is_regenerate = 0;
if(isset($records['regenerate'])) if(isset($records['regenerate']))
@ -5015,9 +5032,35 @@ class PD_Controller extends REST_Controller {
//print_r($data['pd_images']);die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true)); //print_r($data['pd_images']);die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true));
//die(); //die();
//echo "*******************************************"; //echo "*******************************************";
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true); $t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//$t = $this->load->view('temp_html.html',null,true);
echo $t; die();
$total_replaces = substr_count($t,'<span class="tooltip">');
echo $total_replaces;
//echo $t; die();
//echo "*************************************";
//echo strpos($t,'<span class="tooltip">');
//echo "*************************************";
//$t = substr_replace($t,'X',strpos($t,'<span class="tooltiptext">'),strlen('<span class="tooltiptext">'));
// substr_replace($t,'X',strpos($t,'<span class="tooltiptext">'),strpos($t, '</span>', strpos($t,'<span class="tooltiptext">')));
for($i = 0 ;$i < $total_replaces;$i++)
{
$start_pos = strpos($t,'<span class="tooltiptext">');
$end_pos = strpos($t, '</span>', strpos($t,'<span class="tooltiptext">'));
$end_pos = $end_pos + 14;
//echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-';
$t = substr_replace($t,'',$start_pos,($end_pos - $start_pos));
$t = substr_replace($t,'',strpos($t,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
}
//echo $t;
//die();
// if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) { // if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) {
// $dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE); // $dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE);

Binary file not shown.

View File

@ -149,11 +149,11 @@ public static function getOthersAssetsDetails($values){
if(!strcasecmp($fetchVal['business_ownership_type'],'owned')) if(!strcasecmp($fetchVal['business_ownership_type'],'owned'))
{ {
$ownership_type = strtoupper($fetchVal['business_ownership_type']); $ownership_type = ($fetchVal['business_ownership_type']);
$owned_flag++; $owned_flag++;
}else if(!strcasecmp($fetchVal['business_ownership_type'],'rented')) }else if(!strcasecmp($fetchVal['business_ownership_type'],'rented'))
{ {
$ownership_type = strtoupper($fetchVal['business_ownership_type']); $ownership_type = ($fetchVal['business_ownership_type']);
$rental_flag++; $rental_flag++;
} }

View File

@ -823,10 +823,13 @@ class GETPROCESSEDJSON
$applicant_title_name = 'applicant_title_name'; $applicant_title_name = 'applicant_title_name';
$CI->db->SELECT( 'applicant_name,name as applicant_title_name'); $CI->db->SELECT( 'applicant_name,name as applicant_title_name');
$CI->db->FROM(PDAPPLICANTSDETAILS. ' as PDAPPLICANTSDETAILS'); $CI->db->FROM(PDAPPLICANTSDETAILS. ' as PDAPPLICANTSDETAILS');
$CI->db->JOIN(TITLES .' as TITLES','PDAPPLICANTSDETAILS.applicant_title_name = TITLES.title_id'); $CI->db->JOIN(TITLES .' as TITLES','PDAPPLICANTSDETAILS.applicant_title_name = TITLES.title_id','LEFT');
$CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$partner['partner_name']); $CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$partner['partner_name']);
$partner_name= $CI->db->GET()->result_array(); $partner_name= $CI->db->GET()->result_array();
//print_r($partner_name);die(); //print_r($CI->db->last_query());
//print_r($partner_name);
//die();
if(count($partner_name)) if(count($partner_name))
{ {
//echo $partner_name[0][$master_tables_field_names['PDAPPLICANTSDETAILS']];die(); //echo $partner_name[0][$master_tables_field_names['PDAPPLICANTSDETAILS']];die();
@ -1345,7 +1348,7 @@ class GETPROCESSEDJSON
} }
return $raw_json; return ($raw_json);
} }
/*****************########## END BUSINESS FORM DETAILS ##########**************/ /*****************########## END BUSINESS FORM DETAILS ##########**************/

View File

@ -10,8 +10,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<style type="text/css"> <style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
/*.page_break { page-break-before: always; } .page_break { page-break-before: always; }
#page_break { page-break-before: always; } */ #page_break { page-break-before: always; }
/*.page { width: 100%; height: 95%; }*/ /*.page { width: 100%; height: 95%; }*/
@page { @page {
margin: 100px 50px; margin: 100px 50px;
@ -72,7 +72,65 @@ defined('BASEPATH') OR exit('No direct script access allowed');
.simpletable, .simpletable th, .simpletable td { .simpletable, .simpletable th, .simpletable td {
border: 1px solid black; border: 1px solid black;
border-collapse: collapse; border-collapse: collapse;
} }
/* ######### Mini Score Card Table Styles######### */
.mini_scorecard_table {
width: 80%;
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: #ff9900;
padding: 3px;
width: 100px;
height: 5px;
}
#rcorners_red {
background: red;
padding: 3px;
width: 100px;
height: 5px;
}
#rcorners_light_green {
background: #99ff66;
padding: 3px;
width: 100px;
height: 5px;
}
#rcorners_amber{
background: #33cc33;
padding: 3px;
width: 100px;
height: 5px;
}
/* #########End of Mini Score Card DIv Styles######### */
/* #########Score Card Table Styles######### */ /* #########Score Card Table Styles######### */
@ -505,7 +563,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person['name'].'</p>'; echo '<p>'.$person['name'].'</p>';
echo '<p>'.$person['relations'].'</p>'; echo '<p>'.$person['relations'].'</p>';
echo '<br><p>'; echo '<br><br><p>';
if($person['photo']) if($person['photo'])
{ {
echo '<img src='.$person['photo'].' width="200px" height="200px" alt=""/>'; echo '<img src='.$person['photo'].' width="200px" height="200px" alt=""/>';
@ -687,7 +745,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} }
else else
{ echo "<b>Score Chart Not Generated</b>"; } {
//echo "<b>Score Chart Not Generated</b>";
}
if(isset($dsc_cards['base64_dsc_general'])) if(isset($dsc_cards['base64_dsc_general']))
{ {
@ -697,12 +757,58 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} }
else else
{ echo "<b>Score Chart Not Generated</b>"; } {
//echo "<b>Score Chart Not Generated</b>";
}
echo "<div id='page_break'></div>"; echo "<div id='page_break'></div>";
//######################### CHART ########################### //######################### CHART ###########################
} }
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Shared >>", "minimum_client_info" => "Client Information Shared >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
echo '<table class="mini_scorecard_table">';
echo '<tr> <th style="width:60%;">Business Related Parameters Impacting Score</th> <th style="width:25%;"> </th> <th style="width:15%;">Score</th> </tr>';
echo '<tbody>';
foreach($pd_score['business'] as $bsk => $business_score)
{
$class = null;
$per = $business_score['attributed_score'] > 0 && $business_score['max_score'] > 0 ? ( ($business_score['attributed_score'] / $business_score['max_score']) * 100) : 0;
$class = ( $per >= 80 ? 'rcorners_green' : $per >= 70 && $per < 80 ? 'rcorners_light_green' : $per >= 60 && $per < 70 ? 'rcorners_amber' : 'rcorners_red');
echo '<tr> <td class="customtd_rightalign">'. $business_captions[$bsk] .'</td> <td>'. '<div id="'. $class .'"></div></td> <td class="customtd">'. round($business_score['attributed_score'],3).'</td> </tr>';
}
echo '</tbody>';
echo '</table>';
echo '<br><br><br>';
echo '<table class="mini_scorecard_table">';
echo '<tr> <th style="width:60%;">Other Parameters Impacting Score</th> <th style="width:25%;"> </th> <th style="width:15%;">Score</th> </tr>';
echo '<tbody>';
foreach($pd_score['general'] as $gsk => $general_score)
{
$class = null;
$per = $general_score['attributed_score'] > 0 && $general_score['max_score'] > 0 ? ( ($general_score['attributed_score'] / $general_score['max_score']) * 100) : 0;
$class = ( $per >= 80 ? 'rcorners_green' : $per >= 70 && $per < 80 ? 'rcorners_light_green' : $per >= 60 && $per < 70 ? 'rcorners_amber' : 'rcorners_red');
echo '<tr> <td class="customtd_rightalign">'. $general_captions[$gsk] .'</td> <td>'. '<div id="'. $class .'"></div></td> <td class="customtd">'. round($general_score['attributed_score'],3).'</td> </tr>';
}
echo '</tbody>';
echo '</table>';
//die();
?> ?>
<!-- ####################### Address Details Section Statred ############################--> <!-- ####################### Address Details Section Statred ############################-->
@ -714,6 +820,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$business_assets_details = json_decode($pd_processed_forms[22][0]['processed_json'],true); $business_assets_details = json_decode($pd_processed_forms[22][0]['processed_json'],true);
?> ?>
<div id="page_break"></div>
<p><b>PD LOCATION</b></p> <p><b>PD LOCATION</b></p>
<p><?php <p><?php
@ -748,28 +855,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if($business_assets_details['business_assets_for_address'][0]['business_month'] != ""){ $yrs_being_run.= ' and '.$business_assets_details['business_assets_for_address'][0]['business_month'].' Months';} if($business_assets_details['business_assets_for_address'][0]['business_month'] != ""){ $yrs_being_run.= ' and '.$business_assets_details['business_assets_for_address'][0]['business_month'].' Months';}
echo '<p style="text-align:justify;">'; echo '<p style="text-align:justify;">';
echo '<span contenteditable="true">The PD visit was done at </span><div class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></div><span contenteditable="true"> of the loan applicants.</span>'; echo '<span contenteditable="true">The PD visit was done at </span><span class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></span><span contenteditable="true"> of the loan applicants.</span>';
echo '<span contenteditable="true">The </span><div class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div><span contenteditable="true"> is </span><div class="tooltip">'.$property_owner_type.'<span class="tooltiptext">Business Assest Form - Owner of the Property </span></div><span contenteditable="true"> and the business has been in operation from here for the last</span> <div class="tooltip">'.$yrs_being_run.'<span class="tooltiptext">Business Assest Form - Business running Yrs in this premise </span></div><span contenteditable="true">.</span>'; echo '<span contenteditable="true">The </span><span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span><span contenteditable="true"> is </span><span class="tooltip">'.$property_owner_type.'<span class="tooltiptext">Business Assest Form - Owner of the Property </span></span><span contenteditable="true"> and the business has been in operation from here for the last</span> <span class="tooltip">'.$yrs_being_run.'<span class="tooltiptext">Business Assest Form - Business running Yrs in this premise </span></span><span contenteditable="true">.</span>';
echo '<br><br><span contenteditable="true">The</span> <div class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is located in </span><div class="tooltip">'.$locality.'<span class="tooltiptext">Address Form - Locality of Address </span></div> <span contenteditable="true">and the estimated area of the</span> <div class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is</span> <div class="tooltip">'.$estimated_area.'<span class="tooltiptext">Address Form - Estimated Area </span></div> <span contenteditable="true">.</span>'; echo '<br><br><span contenteditable="true">The</span> <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is located in </span><span class="tooltip">'.$locality.'<span class="tooltiptext">Address Form - Locality of Address </span></span> <span contenteditable="true">and the estimated area of the</span> <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is</span> <span class="tooltip">'.$estimated_area.'<span class="tooltiptext">Address Form - Estimated Area </span></span> <span contenteditable="true">.</span>';
echo '<br><br><span contenteditable="true">The PD location was </span>'. $pd_address['pd_location_master'].'<span class="tooltiptext">Address Form - Approach to PD location </span></div>. ' . '<span contenteditable="true">As Per PD Offcier, the</span> <div class="tooltip">'.$address_type .'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is situated in</span><div class="tooltip"> '.$comment_locality_master .'<span class="tooltiptext">Address Form - Comment on locality </span></div> <span contenteditable="true">Locality.</span>'; echo '<br><br><span contenteditable="true">The PD location was </span><span class="tooltip">'. $pd_address['pd_location_master'].'<span class="tooltiptext">Address Form - Approach to PD location </span></span>. ' . '<span contenteditable="true">As Per PD Offcier, the</span> <span class="tooltip">'.$address_type .'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is situated in</span><span class="tooltip"> '.$comment_locality_master .'<span class="tooltiptext">Address Form - Comment on locality </span></span> <span contenteditable="true">Locality.</span>';
echo '<br><br><span contenteditable="true">The PD officer also made the following observations:</span>' ; echo '<br><br><span contenteditable="true">The PD officer also made the following observations:</span>' ;
echo '<br><ul>'; echo '<br><ul>';
echo '<li><span contenteditable="true"> The location of the</span><div class="tooltip"> '.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is</span> <div class="tooltip">'.$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ].'<span class="tooltiptext">Final Remarks Form - The location of the busienss suitability for Business </span></div> <span contenteditable="true">to the nature of business. </span></li>'; echo '<li><span contenteditable="true"> The location of the</span><span class="tooltip"> '.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is</span> <span class="tooltip">'.$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ].'<span class="tooltiptext">Final Remarks Form - The location of the busienss suitability for Business </span></span> <span contenteditable="true">to the nature of business. </span></li>';
if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes') if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes')
{ {
echo '<li><div class="tooltip">Business Activity was seen during visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></div></li>'; echo '<li><span class="tooltip">Business Activity was seen during visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></span></li>';
} }
else{ else{
echo '<li><div class="tooltip">No business activity was seen during the PD visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></div></li>'; echo '<li><span class="tooltip">No business activity was seen during the PD visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></span></li>';
} }
if(isset($business_assets_details['business_assets_form_remark']) && $business_assets_details['business_assets_form_remark'] != ""){ if(isset($business_assets_details['business_assets_form_remark']) && $business_assets_details['business_assets_form_remark'] != ""){
echo '<li><div class="tooltip">'.$business_assets_details['business_assets_form_remark'] .'<span class="tooltiptext">Business Assest Form - Busienss Assest Form Remarks </span></div></li>';} echo '<li><span class="tooltip">'.$business_assets_details['business_assets_form_remark'] .'<span class="tooltiptext">Business Assest Form - Busienss Assest Form Remarks </span></span></li>';}
echo "</ul>"; echo "</ul>";
if($address_form['address_form_remark']) if($address_form['address_form_remark'])
{ {
echo '<div class="tooltip">'.$address_form['address_form_remark'].'<span class="tooltiptext">Address Form - Address Form Remarks </span></div>';} echo '<span class="tooltip">'.$address_form['address_form_remark'].'<span class="tooltiptext">Address Form - Address Form Remarks </span></span>';}
echo "</p>"; echo "</p>";
echo "<div id='page_break'></div>"; echo "<div id='page_break'></div>";
//die(); //die();
@ -949,7 +1056,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} }
$bindEachResult['company_employees'] = ''; $bindEachResult['company_employees'] = '';
if(($businessRow['employees_permanent'] != "" || $businessRow['employees_permanent'] != 0) && ($businessRow['employees_temporary'] != "" || $businessRow['employees_temporary'] != 0)){
// this is for no of employess details // this is for no of employess details
if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) { if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) {
$bindEachResult['company_empployees']='As per person met there are no permanent'; $bindEachResult['company_empployees']='As per person met there are no permanent';
@ -966,8 +1073,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['company_employees'].= ' and no temporary employess with company'; $bindEachResult['company_employees'].= ' and no temporary employess with company';
} }
}
else //Both permanent and Temporary employess zero count if(($businessRow['employees_permanent'] != "" || $businessRow['employees_permanent'] != 0) && ($businessRow['employees_temporary'] != "" || $businessRow['employees_temporary'] != 0))
{ {
$bindEachResult['company_employees'].= ' There are no permanant and temporary employess with company<span contenteditable="true">.</span>'; $bindEachResult['company_employees'].= ' There are no permanant and temporary employess with company<span contenteditable="true">.</span>';
} }
@ -1011,7 +1118,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
array_push($businessResult,$bindEachResult); array_push($businessResult,$bindEachResult);
//print_r($businessResult['visit_documents']);die();
?> ?>
<h3 contenteditable="true">BUSINESS INFORMATION:</h3> <h3 contenteditable="true">BUSINESS INFORMATION:</h3>
<?php <?php
@ -1357,13 +1464,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php <?php
$visit_documents = ($fetchRow['visit_documents']); $visit_documents = ($fetchRow['visit_documents']);
//print_r($visit_documents);die();
$visit_documents_row_count = ceil(count($fetchRow['visit_documents'])/2); $visit_documents_row_count = ceil(count($fetchRow['visit_documents'])/2);
for($vrc = 1;$vrc <= $visit_documents_row_count;$vrc++) for($vrc = 1;$vrc <= $visit_documents_row_count;$vrc++)
{ {
$from = $vrc == 1 ? 1 : ( $vrc + 1); $from = $vrc == 1 ? 0 : ( $vrc );
$to = ($from + 1); $to = $vrc == 1 ? 1 : ( $vrc );
echo '<tr>'; echo '<tr>';
for ($doc = $from; $doc <= $to ; $doc++){ for ($doc = $from; $doc <= $to ; $doc++){
if(isset($visit_documents[$doc])){ if(isset($visit_documents[$doc])){
@ -1553,7 +1661,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(count($businessFinancialResult)>0){ if(count($businessFinancialResult)>0){
?> ?>
<div id='page_break'></div>
<h3 contenteditable="true">Financial Information</h3> <h3 contenteditable="true">Financial Information</h3>
<?php foreach($businessFinancialResult as $iterateFinance){ <?php foreach($businessFinancialResult as $iterateFinance){
@ -1721,7 +1829,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php <?php
//print_r($bankingResult);die(); //print_r($bankingResult);die();
if(count($bankingResult)>0){ ?> if(count($bankingResult)>0){ ?>
<div id="page_break"></div>
<h3 contenteditable="true">Business Banking:</h3> <h3 contenteditable="true">Business Banking:</h3>
<table class="scorecard_table"> <table class="scorecard_table">
<thead> <thead>
@ -1936,7 +2044,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if($to_no_of_clients > 0 ) if($to_no_of_clients > 0 )
{ {
echo '<div id="page_break"></div>';
echo "<h3>Client Details</h3>"; echo "<h3>Client Details</h3>";
?> ?>
@ -2090,11 +2198,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(count($supplierResult)) if(count($supplierResult))
{ {
?> ?>
<div id="page_break"></div>
<h3 contenteditable="true">Supplier Details</h3> <h3 contenteditable="true">Supplier Details</h3>
<?php <?php
foreach($supplierResult as $k => $fetchRow){ foreach($supplierResult as $k => $fetchRow){
echo '</br>Supplier '.($k+1).':</br>'; echo '</br>Supplier '.($k+1).':</br></br></br>';
?> ?>
<table class="scorecard_table"> <table class="scorecard_table">
@ -2182,7 +2290,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(count($stockResult)){ if(count($stockResult)){
$stock_sr_no = 0; $stock_sr_no = 0;
?> ?>
<div id="page_break"></div>
<h3 contenteditable="true">Stock Details</h3> <h3 contenteditable="true">Stock Details</h3>
<?php foreach($stockResult as $getstRow) { ?> <?php foreach($stockResult as $getstRow) { ?>
@ -2625,7 +2733,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} }
} }
?> ?>
<div id="page_break"></div>
<h3 contenteditable="">Personal Assets</h3> <h3 contenteditable="">Personal Assets</h3>
<?php <?php
//print_r($otherAssetResult);die(); //print_r($otherAssetResult);die();
@ -2787,9 +2895,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php foreach($familyResult as $fmKey => $fmValue) { ?> <?php foreach($familyResult as $fmKey => $fmValue) { ?>
<!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> --> <!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> -->
<?php <?php
$intro_text = '<div class="tooltip">'.$fmValue['selected_person_title'].$fmValue['selected_person'].'<span class="tooltiptext">Family Information - Select person for capturing family details</span></div>, <span contenteditable="true">who is an applicant in the case, resides at </span><div class="tooltip">'.$fmValue['residency_address'].'<span class="tooltiptext">Family Information - Residence Address of Select person </span></div><span contenteditable="true">.</span>'; $intro_text = '<span class="tooltip">'.$fmValue['selected_person_title'].$fmValue['selected_person'].'<span class="tooltiptext">Family Information - Select person for capturing family details</span></span>, <span contenteditable="true">who is an applicant in the case, resides at </span><span class="tooltip">'.$fmValue['residency_address'].'<span class="tooltiptext">Family Information - Residence Address of Select person </span></span><span contenteditable="true">.</span>';
$residence_text ='<span contenteditable="true">This is a </span><div class="tooltip">'. $fmValue['residence_ownership'].' <span class="tooltiptext">Family Information - Ownership of Residence </span></div><span contenteditable="true"> residence, where the applicant has been staying for </span><div class="tooltip">'. $fmValue['residence_No_of_years'].'<span class="tooltiptext">Family Information - No of Yrs in current residence </span></div><span contenteditable="true">.</span>'; $residence_text ='<span contenteditable="true">This is a </span><span class="tooltip">'. $fmValue['residence_ownership'].' <span class="tooltiptext">Family Information - Ownership of Residence </span></span><span contenteditable="true"> residence, where the applicant has been staying for </span><span class="tooltip">'. $fmValue['residence_No_of_years'].'<span class="tooltiptext">Family Information - No of Yrs in current residence </span></span><span contenteditable="true">.</span>';
$residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? '<span contenteditable="true">The rent paid Rs.</span>'.$fmValue['rent'].'<span contenteditable="true">per month.</span>' : ''; $residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? '<span contenteditable="true">The rent paid Rs.</span>'.$fmValue['rent'].'<span contenteditable="true">per month.</span>' : '';
echo $intro_text;echo "<br><br>";echo $residence_text; echo $intro_text;echo "<br><br>";echo $residence_text;
@ -2850,7 +2958,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//print_r($existLoanResult);die(); //print_r($existLoanResult);die();
?> ?>
<div id="page_break"></div>
<h3 contenteditable="true">Existing Loan Obligation</h3> <h3 contenteditable="true">Existing Loan Obligation</h3>
<p>The table below lists the details of Existing Loan Obligations of the Loan Applicants.</p> <p>The table below lists the details of Existing Loan Obligations of the Loan Applicants.</p>
@ -2914,7 +3022,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// } // }
} }
?> ?>
<div id='page_break'></div>
<h3>Neighbourhood / Reference Check</h3> <h3>Neighbourhood / Reference Check</h3>
<?php if(count($existNeighRefCheck)>0){ <?php if(count($existNeighRefCheck)>0){
//print_r($existNeighRefCheck);die(); //print_r($existNeighRefCheck);die();

View File

@ -77,7 +77,7 @@ switch (ENVIRONMENT)
case 'testing': case 'testing':
error_reporting(-1); error_reporting(-1);
ini_set('display_errors', 1); ini_set('display_errors', 0);
break; break;
case 'production': case 'production':
ini_set('display_errors', 0); ini_set('display_errors', 0);