PD REPORT AND MOBILE RELEATED

This commit is contained in:
velz 2019-04-29 23:44:54 +05:30
parent 57edc98b12
commit 17502b821b
9 changed files with 280 additions and 146 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
api/application/vendor/*
api/application/logs/*
api/application/syslogs/*
api/application/request_logs/*
api/application/docs/*
!api/application/logs/index.html
!api/application/logs/.htaccess

View File

@ -501,6 +501,7 @@ class PD_Controller extends REST_Controller {
foreach($pd_applicant_details as $pd_applicant_detail)
{
$pd_applicant_detail['fk_pd_id'] = $pd_id;
$pd_applicant_detail['applicant_name'] = MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['applicant_name']);
$co_applicant_id = $this->PD_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS);
if($co_applicant_id != null || $co_applicant_id != '')
{
@ -892,16 +893,10 @@ class PD_Controller extends REST_Controller {
if($pd_id != "" || $pd_id != null)
{
//Save Assigned Address Details to newly created Addtional PD in address table - HOLD TEMP (NOT DONE)
// for this have to change getPDAddress model funcitons
// $current_address = $this->PD_Model->getPDAddress(null,$newpd['fk_address_id']);
// if(count($current_address))
// {
// $temp_address = $current_address[0];
// $tem_address['pd_address_id'] = null;
// $id = $this->PD_Model->saveRecords($tem_address,PDADDRESS);
// }
//update Applicant details
$fields = array('additional_pd_id' => $pd_id);
$where_condition_array = array('pd_co_applicant_id'=>$pd_details['pd_co_applicant_id'],'mobile_no' => $pd_details['mobile_no']);
$this->PD_MODEL->updateRecords($fields,PDAPPLICANTSDETAILS,$where_condition_array);
$logger = MYLOG::logFunction();
$logger->info("TEMPLATE ASSIGN FUNCTIONALTIY CALLED AND TEMPLATED ID - ".$newpd['fk_pd_template_id']." CHOOSED",array('ENV'=>ENVIRONMENT,'Parent-PDID' => $newpd['parent_pd_id'],'Addresss ID'=>$newpd['fk_address_id'] ,'PDID' => $pd_id,'PD Type' => "Addtional PD",'Current_status' => $newpd['pd_status']));
@ -4010,6 +4005,7 @@ class PD_Controller extends REST_Controller {
}
$temp_array['pd_report_generated_date'] = date('Y-m-d h:m:s');
$id = $this->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array);
$latest_version = 0;
@ -4692,8 +4688,8 @@ class PD_Controller extends REST_Controller {
public function codeigniterViewTest_post()
{
PDALERTS::pdnotification(600);
die();
// PDALERTS::pdnotification(600);
// die();
$records = $this->post('records');
$pdid = $records['pd_id'];
$is_regenerate = 0;
@ -4702,14 +4698,14 @@ class PD_Controller extends REST_Controller {
$is_regenerate = 1;
}
//print_r($records);
// $data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
// $data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
// $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
// $data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
$data['pd_score'] = $this->calculateScore($pdid);
print_r($data['pd_score']);
die();
$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
//print_r($data['pd_score']);
// die();
//$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
//echo $score_for_chart;
$chart = null;
if($chart)

Binary file not shown.

View File

@ -121,6 +121,14 @@ class MYUTIL
$indian_num_format = numfmt_create( 'en_IN', NumberFormatter::CURRENCY );
//echo numfmt_format_currency($indian_num_format,$value, "INR");
return numfmt_format_currency($indian_num_format,$value, "INR");
}
public static function applicantNameCamelCaseConvertion($name)
{
$name = explode(' ',$name);
$final_name = null;
foreach($name as $n){ $final_name.= ' '.ucfirst(strtolower($n)); }
return $final_name;
}
}

View File

@ -533,10 +533,10 @@ class PDSCORE
$current_actual_score += $f_value['attributed_score'];
}
$score_questions['score_summary'][$key] = array('actual_score' => $current_actual_score,'max_score' => $current_max_score);
$score_questions['score_summary'][$key] = array('actual_score' => $current_actual_score,'max_score' => $current_max_score,'score_per' => (($current_actual_score/$current_max_score) * 100));
}
$score_questions['score_summary']['overall_score'] = array('overall_actual_score' => $overall_actual_score, 'overall_max_score' => $overall_max_score,'final_score' => round(($overall_actual_score/$overall_max_score) * 100));
$score_questions['score_summary']['overall_score'] = array('overall_actual_score' => $overall_actual_score, 'overall_max_score' => $overall_max_score,'final_score' => (($overall_actual_score/$overall_max_score) * 100));
$score_questions['score_summary']['asset_calculation_details'] = $asset_calculation_details;
//print_r($score_questions);die();

View File

@ -384,7 +384,7 @@ abstract class REST_Controller extends CI_Controller {
$agent = 'Unidentified User Agent';
}
$logger = MYLOG::logFunction('request_logger');
$logger->info('REQUEST_INFO',array('ip' => $this->input->ip_address(),'paltform' => $this->agent->platform(),'browser' => $agent));
$logger->info('REQUEST_INFO',array('ip' => $this->input->ip_address(),'platform' => $this->agent->platform(),'browser' => $agent));
}
/**

View File

@ -285,7 +285,7 @@ class PD_Model extends SPARQ_Model {
//print_r($addtional_pd_ids_string);die();
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode,PDAPPLICANTSDETAILS.relation,RELATIONSHIPS.name as relation_name,PDAPPLICANTSDETAILS.landline,PDAPPLICANTSDETAILS.company_name,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name');
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode,PDAPPLICANTSDETAILS.relation,RELATIONSHIPS.name as relation_name,PDAPPLICANTSDETAILS.landline,PDAPPLICANTSDETAILS.company_name,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDAPPLICANTSDETAILS.additional_pd_id');
$this->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
$this->db->JOIN(STATE.' as STATE','PDAPPLICANTSDETAILS.fk_state = STATE.state_id','LEFT');
$this->db->JOIN(CITY.' as CITY','PDAPPLICANTSDETAILS.fk_city = CITY.city_id','LEFT');
@ -320,6 +320,7 @@ class PD_Model extends SPARQ_Model {
public function getPDAddress($temp_pdid)
{
$pdid = $temp_pdid;
$pd_master_detials = $this->getPDMasterDetails($pdid);
$assigned_pd = null;
@ -343,7 +344,7 @@ class PD_Model extends SPARQ_Model {
$this->db->ORDER_BY('PDADDRESS.pd_address_id');
$result_child_array = $this->db->GET()->result_array();
//print_r($this->db->last_query());
//print_r($result_child_array);
//print_r($result_child_array);die();
if(count($result_child_array) != 0)
{
@ -743,7 +744,7 @@ class PD_Model extends SPARQ_Model {
*/
public function getPDMasterDetails($pdid)
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y") as pd_report_generated_date,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');

View File

@ -202,4 +202,82 @@
<th style="vertical-align: top;background: #ccc;color: #000" width="100">referrer:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre></pre></td>
</tr></table></td>
</tr></table><h1 style="background: #468847;color: #ffffff;padding: 5px;" class="monolog-output">INFO</h1><table cellspacing="1" width="100%" class="monolog-output"><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Message:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>REQUEST_INFO</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Time:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>2019-04-27 19:14:26</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Channel:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>request_logger</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Context:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><table cellspacing="1" width="100%"><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">ip:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>::1</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">platform:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>Windows 10</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">browser:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>Firefox 66.0</pre></td>
</tr></table></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Extra:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><table cellspacing="1" width="100%"><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">url:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>/AWSEC2/sparqapi/api/getUsersDetails</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">ip:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>::1</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">http_method:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>POST</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">server:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>localhost</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">referrer:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre></pre></td>
</tr></table></td>
</tr></table><h1 style="background: #468847;color: #ffffff;padding: 5px;" class="monolog-output">INFO</h1><table cellspacing="1" width="100%" class="monolog-output"><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Message:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>REQUEST_INFO</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Time:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>2019-04-27 19:18:02</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Channel:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>request_logger</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Context:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><table cellspacing="1" width="100%"><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">ip:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>::1</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">platform:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>Windows 10</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">browser:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>Firefox 66.0</pre></td>
</tr></table></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">Extra:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><table cellspacing="1" width="100%"><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">url:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>/AWSEC2/sparqapi/api/getUsersDetails</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">ip:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>::1</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">http_method:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>POST</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">server:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre>localhost</pre></td>
</tr><tr style="padding: 4px;text-align: left;">
<th style="vertical-align: top;background: #ccc;color: #000" width="100">referrer:</th>
<td style="padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000"><pre></pre></td>
</tr></table></td>
</tr></table>

View File

@ -83,9 +83,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
.scorecard_table tr:hover {background-color: #ddd;}
.scorecard_table th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding-top: 8px;
padding-bottom: 8px;
text-align: center;
background-color: #4CAF50;
color: white;
}
@ -123,15 +123,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "<h1><center>PERSONAL DISCUSSION REPORT</center></h1> ";
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
echo "<h2><center>".$pd_master_details[0]['title_name'].$pd_master_details[0]['main_applicant']."</center></h2>";
echo "<h2><center>".$pd_master_details[0]['title_name'].' '.$pd_master_details[0]['main_applicant']."</center></h2>";
echo "</div>";
echo "<br><br><br><br>";
?>
<table>
<tbody>
<?php
echo "<tr><td>PD Report Date </td> <td> </td> <td>".$pd_master_details[0]['updatedon']."</td>";
echo "<tr><td>PD Initiated Date </td> <td> </td> <td> ".$pd_master_details[0]['pd_date_of_initiation']."</td></tr>";
echo "<tr><td>PD Vist Date </td> <td> </td> <td> ".$pd_master_details[0]['scheduled_on']."</td></tr>";
echo "<tr><td>PD Report Date </td> <td> </td> <td>".$pd_master_details[0]['pd_report_generated_date']."</td>";
echo "<tr><td>PD Initiated by </td> <td> </td> <td>".$pd_master_details[0]['branch_name']." Branch</td></tr>";
echo "<tr><td>Loan Application ID </td> <td> </td> <td> ".$pd_master_details[0]['lender_applicant_id']."</td></tr>";
echo "<tr><td>Product </td> <td> </td> <td>".$pd_master_details[0]['product_name']."</td></tr>";
@ -149,20 +150,177 @@ defined('BASEPATH') OR exit('No direct script access allowed');
";
echo "<div class='page_break'></div>";
echo "<br><br>";
// ########################### End of Master Details Section ####################################
?>
<!-- GENERAL INFORMATIN -->
// ########################### Score Card Section ###############################################
<?php
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
$persons_met = "Default";
$all_company_details = null;
if(array_key_exists('companies',$general_form))
{
$all_company_details = $general_form['companies'];
}
echo "<h2>Executive Summary</h2>";
?>
<table>
<tbody>
<tr>
<td>Person(s) Met&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_person_met'] == true)
{
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : "Not Available" ;
echo '<br>'.$individual['applicant_title_name_master'] .' '. $applicant_name.'<br>' ;
$company_relationship_data = null;
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
$company_relationship_data .= $company_with_relationship['company_relationship_master'].' '.$company_with_relationship['company_name'];
$company_relationship_data.='<br><center>and</center><br>';
}
}
//print_r($general_form['persons_with_relationships']);die();
$personal_relationship_data = null;
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && isset($persons_with_relationship['relationship']))
{
$RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find";
if(isset($persons_with_relationship['relationship_master']))
{
$personal_relationship_data .= $persons_with_relationship['relationship_master'] .' Of '. $RSNA;
$personal_relationship_data.='<br><center>and</center><br>';
}
}
}
$company_relationship_data .= $personal_relationship_data;
//echo $company_relationship_data;
echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, '<br><center>and</center><br>'),strlen($company_relationship_data));
}
}
?>
</td></tr>
</tbody>
</table>
<!-- sdfs
<table class="scorecard_table">
<tr> <th>Name</th> <th>Age(Years)</th> <th>Qualification</th> <th>Relationships</th> <tr>
<tbody>
<tr> <td>Name</td> <td>Age</td> <td>Qualification</td> <td>Relationship</td> <tr>
<tr> <td>Name2</td> <td>Age2</td> <td>Qualification2</td> <td>Relationship2</td> <tr>
</tbody>
</table>-->
<br><br><br>
<p>Loan Applicants</p>
<table class="scorecard_table">
<tr> <th>Name</th> <th>Age<br>(Yrs)</th> <th>Qualification</th> <th>Relationships</th> </tr>
<tbody>
<?php
//print_r($general_form['individuals']);
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_applicant'] == true)
{
$education_qualification = $individual['qualification_master'];
$education_qualification = $individual['course_name'] != "" || $individual['course_name'] != null ? $education_qualification.'<br>('.$individual['course_name'].')' : $education_qualification;
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find" ;
//echo $applicant_name.'**************************';
echo "<tr><td>".$individual['applicant_title_name_master'].' '.$applicant_name."</td><td>".$individual['age']."</td><td>".$education_qualification."</td><td>";
$company_relationship_data = null;
//print_r($general_form['company_with_relationships']);
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
//print_r($company_with_relationship);
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
//echo "ONCE";
$company_relationship_data = ($company_with_relationship['company_relationship_master'] .' '.$company_with_relationship['company_name']);
$company_relationship_data.='<br><center>and</center><br>';
}
}
//echo '*********'.$company_relationship_data.'*********';
//echo strrpos($company_relationship_data, '');
// $company_relationship_data = substr_replace($company_relationship_data, '', strrpos($company_relationship_data, '<br><center>and</center><br>'),strlen($company_relationship_data));
// echo $company_relationship_data;
$personal_relationship_data = null;
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
if(($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] || !strcasecmp($applicant_name,$persons_with_relationship['applicant_name']))&& isset($persons_with_relationship['relationship']))
{
$RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find";
if(isset($persons_with_relationship['relationship_master']))
{
$personal_relationship_data .= $persons_with_relationship['relationship_master'] .' of '. $RSNA;
$personal_relationship_data.='<br><center>and</center><br>';
}
}
}
$company_relationship_data .= $personal_relationship_data;
echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, '<br><center>and</center><br>'),strlen($company_relationship_data));
echo "</td></tr>";
}
}
?>
</tbody>
</table>
<div class='page_break'></div>
<?php
// if($general_form['general_remark'] != "") { ?>
<!-- <p>PD Officers Note (About General Section) :</p> --><?php //echo $general_form['general_remark'];
// }
?>
<!-- ########################### End of Cover Page Section ####################################-->
<!-- ########################### Score Card Section ############################################### -->
<?php
$is_show_scorecard = 1;
if($is_show_scorecard)
{
echo "<h2>PD Score Summary</h2>";
?>
<table>
<tr> <td>General Section Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['general']['actual_score'],2,'.',',')?></td></tr>
<tr> <td>Business Section Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['business']['actual_score'],2,'.',',')?></td></tr>
<tr> <td>Final Remarks Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.',',')?></td></tr>
<tr> <td>Final PD Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['overall_score']['final_score'],2,'.',',')?></td> <td style="font-size:9px;">(Over all Acutal score (<?php echo number_format($pd_score['score_summary']['overall_score']['overall_actual_score'],2,'.',',');?>) / over all Maximum Score (<?php echo number_format($pd_score['score_summary']['overall_score']['overall_max_score'],2,'.',',');?> )) * 100)</td></tr>
<table class="scorecard_table">
<tr> <th> </th> <th>Actual Score</th> <th>Max Score</th> <th>Score %</th> </tr>
<tr> <td>General Section Score</td> <td> <?php echo number_format($pd_score['score_summary']['general']['actual_score'],2,'.',',')?></td> <td><?php echo number_format($pd_score['score_summary']['general']['max_score'],2,'.',',')?></td> <td> <?php echo round($pd_score['score_summary']['general']['score_per'],2)?></td></tr>
<tr> <td>Business Section Score</td> <td> <?php echo number_format($pd_score['score_summary']['business']['actual_score'],2,'.',',')?></td> <td><?php echo number_format($pd_score['score_summary']['business']['max_score'],2,'.',',')?></td> <td> <?php echo round($pd_score['score_summary']['business']['score_per'],2)?></td></tr>
<tr> <td>Final Remarks Score</td> <td> <?php echo number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.',',')?></td> <td><?php echo number_format($pd_score['score_summary']['final_remarks']['max_score'],2,'.',',')?></td><td> <?php echo round($pd_score['score_summary']['final_remarks']['score_per'],2)?></td></tr>
<tr> <td>Final PD Score</td> <td> <?php echo number_format($pd_score['score_summary']['overall_score']['overall_actual_score'],2,'.',',')?></td> <td><?php echo number_format($pd_score['score_summary']['overall_score']['overall_max_score'],2,'.',',')?></td> <td> <?php echo round($pd_score['score_summary']['overall_score']['final_score'],2)?></td></tr>
</table>
<?php
@ -180,116 +338,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "<div class='page_break'></div>";
//######################### CHART ###########################
?>
<?php
// ####################### General Section Statred ############################-->
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
//print_r($general_form);
$persons_met = "Default";
$all_company_details = null;
if(array_key_exists('companies',$general_form))
{
$all_company_details = $general_form['companies'];
}
?>
<div class='page_break'></div>
<h3>General Section Information</h3>
<table>
<tbody>
<tr>
<td>Person(s) Met&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_person_met'] == true)
{
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : "Not Available" ;
echo '<br>'.$individual['applicant_title_name_master'] . $applicant_name ;
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
echo '<br>'.$company_with_relationship['company_relationship_master'] .' Of '.$company_with_relationship['company_name'] . '<br>';
}
}
//print_r($general_form['persons_with_relationships']);die();
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && isset($persons_with_relationship['relationship']))
{
//echo '<br>'. isset($persons_with_relationship['relationship_master']) ? $persons_with_relationship['relationship_master'] : " Could Not Find" .' Of '.$persons_with_relationship['relation_to_master'] . '<br>';
//print_r($persons_with_relationship);
$RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find";
isset($persons_with_relationship['relationship_master']) ? print_r($persons_with_relationship['relationship_master'] .' Of '. $RSNA) : "";
}
}
}
}
?>
</td></tr>
</tbody>
</table>
<p>Loan Applicants</p>
<!-- <table border=1 style='border-collapse:collapse;'> -->
<table class="scorecard_table" >
<?php
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_applicant'] == true)
{
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find" ;
echo "<tr><td>".$individual['applicant_title_name_master'].$applicant_name."</td><td>";
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
echo "<br>";
print_r($company_with_relationship['company_relationship_master'] .' Of '.$company_with_relationship['company_name']);
}
}
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
//print_r($persons_with_relationship);
if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && isset($persons_with_relationship['relationship']))
{
echo "<br><br>";
$RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find";
isset($persons_with_relationship['relationship_master']) ? print_r($persons_with_relationship['relationship_master'] .' Of '. $RSNA) : "";
//print_r($persons_with_relationship);
}
}
echo "</tr>";
}
}
?>
</table>
<?php if($general_form['general_remark'] != "") { ?>
<p>PD Officer's Note (About General Section) :</p> <?php echo $general_form['general_remark'];
}
?>
<!-- ####################### End Of General Section ############################-->
<!-- ####################### Address Details Section Statred ############################-->
<?php $address_form = json_decode($pd_processed_forms[5][0]['processed_json'],true);
@ -1697,7 +1747,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<h3>Details Score Card Section</h3>
<?php
$i = 1;
$i = null;
if($i)
{
// *** General Section Questions Score Table