TELE PD REPORT FEEDBACK
This commit is contained in:
parent
48dc954952
commit
0a6f3fd9cb
@ -5886,7 +5886,7 @@ public function getPDFormDetailsJSON_post()
|
||||
{
|
||||
|
||||
//print_r($this->aws_s3->createNewBucket('xmldatatest007'));die();
|
||||
//satellite_image::getSatelliteImage(1213);die();
|
||||
//satellite_image::getSatelliteImage(1704);die();
|
||||
//echo $this->assignPDTempalate(1325);die();
|
||||
//$this->getSatelliteImage(342);die();//velmurugan.s@venbainfotech.com
|
||||
// PDALERTS::sendSalesPDMail($this,2);die();
|
||||
@ -5896,14 +5896,14 @@ public function getPDFormDetailsJSON_post()
|
||||
// $this->load->helper('push_notification');
|
||||
// PUSH_NOTIFICATION::notifyWeb("fJJeUjCWSSs:APA91bHJIHVBJ4KuBbz5sEQSTXG171KpUyraekuejPedkCVrFrULvh8R8JmIHZlovA3QJogr007Yv6IN0Bhja_oBScMBFS2MAWAyPOWLDwsY-OeoPbOx8vzNalvJ7yt0jcB_atJcTbAD","The New PD 255 has been triggered...",array());die();
|
||||
// print_r($this->db->error());die();
|
||||
//$s3result= $this->aws_s3->uploadFileToS3Bucket(array('bucket_name' =>'xmldatatest007' ,'key' => 'packages/tourone.xml','sourcefile' => 'C:\xampp\htdocs\XMLTOARRAY\mydata.xml',));die();
|
||||
//$s3result= $this->aws_s3->uploadFileToS3Bucket(array('bucket_name' =>'xmldatatest007' ,'key' => 'packages/tourone.xml','sourcefile' => 'C:\xampp\htdocs\XMLTOARRAY\mydata.xml',));die();
|
||||
//$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI('xmldatatest007','packages/tourone.xml','+1 minutes');
|
||||
//echo $singed_uri;
|
||||
// $new = simplexml_load_string(file_get_contents($singed_uri));
|
||||
// $con = json_decode(json_encode($new),true);
|
||||
// print_r($con) ;
|
||||
// die();
|
||||
set_time_limit(60);
|
||||
//set_time_limit(60);
|
||||
$records = $this->post('records');
|
||||
$pdid = $records['pd_id'];
|
||||
|
||||
@ -6027,14 +6027,14 @@ public function getPDFormDetailsJSON_post()
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
|
||||
//print_r($data['pd_score']);
|
||||
//die();
|
||||
// print_r($data['pd_score']);
|
||||
// die();
|
||||
$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
|
||||
|
||||
//print_r($data['pd_master_details'][0]['is_score_card_enabled']);die();
|
||||
// echo "**************************";
|
||||
//$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
if($data['pd_master_details'][0]['is_score_card_enabled'] == 0 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL"))// && $data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CHQ")) //&& ($data['pd_master_details'][0]['customer_segment_abbr'] != ''))
|
||||
if($data['pd_master_details'][0]['is_score_card_enabled'] == 1 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL"))// && $data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CHQ")) //&& ($data['pd_master_details'][0]['customer_segment_abbr'] != ''))
|
||||
{
|
||||
//echo $data['pd_master_details'][0]['is_score_card_enabled'].'-'.$data['pd_master_details'][0]['customer_segment_abbr'];die();
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
@ -7437,7 +7437,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$loan_amt_from_loam_form = $loan_amt_from_loam_form['loan_amount'];
|
||||
//echo $loan_amt_from_loam_form;
|
||||
//seperate PD Scorable quesitons from JSON
|
||||
$score_questions = $this->seperateScoreQuestions($form_data,$pd_master_details[0]['is_otp_done']);
|
||||
$score_questions = $this->seperateScoreQuestions($form_data,$pd_master_details);
|
||||
//print_r($score_questions);die();
|
||||
// echo "###################################";
|
||||
//Get Pesrsonal Assets Grid Masters Details
|
||||
@ -7504,10 +7504,11 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
|
||||
//Get All Score able Question from various PD Forms - 3 Questions Pending
|
||||
public function seperateScoreQuestions($form_data,$OTP)
|
||||
public function seperateScoreQuestions($form_data,$pd_master_details)
|
||||
{
|
||||
$score_questions = array();
|
||||
|
||||
$OTP = $pd_master_details[0]['is_otp_done'];
|
||||
$is_this_tele_pd = $pd_master_details[0]['fk_pd_type'] == 3 ? true : null;
|
||||
#####General Form Questions########
|
||||
$general_form = (json_decode($form_data[18][0]['processed_json'],true));
|
||||
// echo "seperateScoreQuestions";
|
||||
@ -7530,6 +7531,9 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$score_questions['general']['person_met_is_applicant'] = 'yes';
|
||||
}
|
||||
}
|
||||
|
||||
//if tele pd remove person_met_is_applicant
|
||||
if($is_this_tele_pd){ unset($score_questions['general']['person_met_is_applicant']);}
|
||||
//print_r($qualification_temp_array);
|
||||
$qualification_temp_array = array_map(function($item){
|
||||
return $item != "" || $item != null ? $item : 6;
|
||||
@ -7558,10 +7562,14 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
if(isset($address_form['is_pd_done_on_initiated_address']) && $address_form['is_pd_done_on_initiated_address'] != 1)
|
||||
{
|
||||
|
||||
// 4 - QNO(1.2) - Comment on locality
|
||||
$score_questions['general']['comment_locality'] = $address_form['alternative_addresses'][0]['comment_locality_master'];
|
||||
// 5 - QNO(1.3) - pd location approach
|
||||
$score_questions['general']['pd_location_approach'] = $address_form['alternative_addresses'][0]['pd_location_master'];
|
||||
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
// 4 - QNO(1.2) - Comment on locality
|
||||
$score_questions['general']['comment_locality'] = $address_form['alternative_addresses'][0]['comment_locality_master'];
|
||||
// 5 - QNO(1.3) - pd location approach
|
||||
$score_questions['general']['pd_location_approach'] = $address_form['alternative_addresses'][0]['pd_location_master'];
|
||||
}
|
||||
|
||||
}
|
||||
else //get it from alternative address
|
||||
@ -7583,23 +7591,32 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
|
||||
// 6 - QNO(1.4) - customer behaviour
|
||||
$score_questions['general']['customer_behaviour'] = $final_remarks_form['final_custormer_remark_type_master'];
|
||||
|
||||
$score_questions['general']['customer_behaviour'] = $final_remarks_form['final_custormer_remark_type_master'];
|
||||
|
||||
|
||||
// 7 - QNO(3.1) - pd_officer_recommadations
|
||||
$score_questions['final_remarks']['pd_officer_recommandations'] = $final_remarks_form['pd_officers_recommendation_master'];
|
||||
// 8 - QNO(2.11) - pd location approach
|
||||
$score_questions['business']['location_suited_for_busienss'] = $final_remarks_form['is_service_provided'];
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
$score_questions['business']['location_suited_for_busienss'] = $final_remarks_form['is_service_provided'];
|
||||
}
|
||||
|
||||
#####End of Final Remarks Form Questions########
|
||||
|
||||
|
||||
#####Neighbourhood Form Questions########
|
||||
$neighbourhood_form = (json_decode($form_data[19][0]['processed_json'],true));
|
||||
//print_r($neighbourhood_form);
|
||||
|
||||
|
||||
// 9 - QNO(1.5) - neibourhood_check_as_per_pd_officer
|
||||
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = isset($neighbourhood_form['neighbourhood_status']) ? $neighbourhood_form['neighbourhood_status'] : 'Negative';
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
$neighbourhood_form = (json_decode($form_data[19][0]['processed_json'],true));
|
||||
//print_r($neighbourhood_form);
|
||||
|
||||
|
||||
// 9 - QNO(1.5) - neibourhood_check_as_per_pd_officer
|
||||
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = isset($neighbourhood_form['neighbourhood_status']) ? $neighbourhood_form['neighbourhood_status'] : 'Negative';
|
||||
}
|
||||
#####End of Neighbourhood Form Questions########
|
||||
|
||||
|
||||
@ -7614,7 +7631,10 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$score_questions['business']['business_seasonality'] = $business_form['seasonality'];
|
||||
|
||||
// 12 - QNO(2.3) - employees_total
|
||||
$score_questions['business']['employees_total'] = $business_form['employees_total'];
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
$score_questions['business']['employees_total'] = $business_form['employees_total'];
|
||||
}
|
||||
|
||||
|
||||
// 13 - QNO(2.4) - all business certificate
|
||||
@ -7663,8 +7683,12 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$score_questions['business']['owned_property'] = $property_count ? 'yes':'no';
|
||||
// 15 - QNO(2.6) - owned_vechile
|
||||
$score_questions['business']['owned_vechile'] = $vechile_count ? 'yes':'no';
|
||||
|
||||
// - QNO (2.12) - business_activity seen
|
||||
$score_questions['business']['business_activity_has_seen'] = isset($business_assest_form['business_assets_for_address'][0]['business_is_pd_visited'])? $business_assest_form['business_assets_for_address'][0]['business_is_pd_visited']: 'no';
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
$score_questions['business']['business_activity_has_seen'] = isset($business_assest_form['business_assets_for_address'][0]['business_is_pd_visited'])? $business_assest_form['business_assets_for_address'][0]['business_is_pd_visited']: 'no';
|
||||
}
|
||||
}
|
||||
#####End of Business Assets Form Questions########
|
||||
|
||||
@ -8876,6 +8900,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
//update geo location to pd master table
|
||||
$this->PD_Model->updateRecords(array('start_location' => $records['link']),PDTRIGGER,array('pd_id' => $records['fk_pd_id']));
|
||||
satellite_image::getSatelliteImage($records['fk_pd_id']);
|
||||
}
|
||||
else if(strpos($records['image_key'], 'common_image') !== false)
|
||||
{
|
||||
|
||||
@ -56,12 +56,12 @@ class satellite_image
|
||||
|
||||
}
|
||||
|
||||
|
||||
$geo_location = preg_replace('/\s+/', '', $geo_location);
|
||||
$url = "https://maps.googleapis.com/maps/api/staticmap?center=".$geo_location."&zoom=14&markers=color:red|".$geo_location."&size=800x300&maptype=roadmap&key=".$google_map_static_api_key;
|
||||
//echo $url;
|
||||
$ou = file_put_contents($path_to_check.'/satellite.png', file_get_contents($url));
|
||||
$satellite_script = $url;
|
||||
|
||||
//echo $url;
|
||||
|
||||
|
||||
// //convert as base 64 image.
|
||||
|
||||
@ -542,10 +542,11 @@ if ( isset($pdf) ) {
|
||||
<?php
|
||||
|
||||
echo '<tr><td>PD Initiated Date </td> <td style="width:2%;">:</td> <td> '.$pd_master_details[0]['createdon'].'</td></tr>';
|
||||
echo '<tr><td>PD Type </td> <td style="width:2%;">:</td> <td> Telephonic </td></tr>';
|
||||
|
||||
echo '<tr><td>Tele PD Date </td> <td style="width:2%;">:</td> <td> '.$pd_master_details[0]['pd_visit_date'].'</td></tr>';
|
||||
echo '<tr><td>PD Report Date </td> <td style="width:2%;">:</td> <td>'.$pd_master_details[0]['pd_report_generated_date'].'</td></tr>';
|
||||
echo '<tr><td>PD Initiated by </td> <td style="width:2%;">:</td> <td>'.$pd_master_details[0]['branch_name'].' Branch</td></tr>';
|
||||
echo '<tr><td>PD Type </td> <td style="width:2%;">:</td> <td> Telephonic </td></tr>';
|
||||
echo '<tr><td>Loan Application ID </td> <td style="width:2%;">:</td> <td> '.$pd_master_details[0]['lender_applicant_id'].'</td></tr>';
|
||||
echo '<tr><td>Product </td> <td style="width:2%;">:</td> <td>'.$pd_master_details[0]['product_name'].'</td></tr>';
|
||||
echo '<tr><td>Customer Segment </td> <td style="width:2%;">:</td> <td>'.(explode('-',$pd_master_details[0]['customer_segment_name'])[0]).'</td></tr>';
|
||||
@ -1089,7 +1090,7 @@ if ( isset($pdf) ) {
|
||||
<img border="3" src = "<?php echo $satellite_url;?>" alt=" Satellite Image of location of Where PD was Done" style="width:100%;height:300px;border-color:#0191ed" /><br><br><br>
|
||||
|
||||
<?php if($name_board_seen_img_url != "") {?>
|
||||
<table>
|
||||
<table align="center">
|
||||
<thead>
|
||||
<tr> <th>Name Board of Business/Entrance</th> </tr>
|
||||
</thead>
|
||||
@ -2288,7 +2289,7 @@ if($total_no_of_business > 0) {
|
||||
|
||||
|
||||
}
|
||||
else{ echo "<p>Financial statements not provided by Loan Applicants to PD officer. </p>";}
|
||||
//else{ echo "<p>Financial statements not provided by Loan Applicants to PD officer. </p>";}
|
||||
?>
|
||||
|
||||
|
||||
@ -2434,7 +2435,7 @@ if($total_no_of_business > 0) {
|
||||
|
||||
if($financial_kuccha_info['kuccha_records_shown'] == 'yes')
|
||||
{
|
||||
echo '<br><br>Photograph of Kuchha Bills Allowed (Yes/No) : '. ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report': 'No');
|
||||
echo '<br><br>Photograph of Kuchha Bills Shared (Yes/No) : '. ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report': 'No');
|
||||
|
||||
// echo '<br><br>Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. ( $financial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': 'No');
|
||||
}
|
||||
@ -2557,7 +2558,7 @@ if($total_no_of_business > 0) {
|
||||
<?php }
|
||||
else
|
||||
{
|
||||
echo '<p>As per person met, Applicant does not have any business account.</p>';
|
||||
echo '<p>As per loan applicant(s), Applicant does not have any business account.</p>';
|
||||
}
|
||||
|
||||
if($business_banking_common_remarks != ""){ echo '<p>'.$business_banking_common_remarks.'</p>'; }
|
||||
@ -4281,7 +4282,7 @@ if($total_no_of_business > 0) {
|
||||
|
||||
<!-- #################Final Remarks Section#################-->
|
||||
<div class="page_break"></div>
|
||||
<br><h3 contenteditable="true">PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
|
||||
<br><h3 contenteditable="true">PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR & OVERALL PD STATUS</h3>
|
||||
<?php
|
||||
//print_r($final_remark_data);
|
||||
$polite = null;$rude = null; $other_behaviour = null;$other_behaviour_remarks = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user