INDUSIND CHANGES PD REPORT TAT ALERT API
This commit is contained in:
parent
1be439f47a
commit
424b7425a7
@ -223,7 +223,7 @@ $config['allow_get_array'] = TRUE;
|
||||
| your log files will fill up very fast.
|
||||
|
|
||||
*/
|
||||
$config['log_threshold'] = array(1,2);
|
||||
$config['log_threshold'] = 1;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@ -113,11 +113,11 @@ else if(ENVIRONMENT == 'testing')
|
||||
defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0');
|
||||
defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr');
|
||||
}
|
||||
else if(ENVIRONMENT == 'prod')
|
||||
else if(ENVIRONMENT == 'production')
|
||||
{
|
||||
defined('SATELLITE_IMAGE_LOCATION') OR define('SATELLITE_IMAGE_LOCATION','phantomsatellite_test');
|
||||
defined('DETAILED_SCORE_CARD_IMAGE_LOCATION') OR define('DETAILED_SCORE_CARD_IMAGE_LOCATION','phantom_dsc_test');
|
||||
defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','lender');
|
||||
defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','pdgenie-lender');
|
||||
defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_test');
|
||||
defined('LOGTOBOT') OR define('LOGTOBOT',0);
|
||||
defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0');
|
||||
|
||||
@ -235,6 +235,7 @@ $route['getDashBoardLenderCity'] = 'Dash_Board_Controller/getDashBoardDetailsOfL
|
||||
$route['getDashBoardDetailsOfCity'] = 'Dash_Board_Controller/getDashBoardDetailsOfCitywise';
|
||||
$route['getDashBoardAlertDetails'] = 'Dash_Board_Controller/getDashBoardDetailsOfAlert';
|
||||
$route['PD_MIS_report'] = 'Dash_Board_Controller/PD_MIS_report';
|
||||
$route['alertPDTAT'] = 'Dash_Board_Controller/alertPDTAT';
|
||||
|
||||
$route['testCognito'] = 'Branch_Controller/testCognito';
|
||||
//$route['(getPDReportHTML/:any)'] = 'Welcome/getPDReportHTML';
|
||||
|
||||
@ -18,6 +18,7 @@ class Dash_Board_Controller extends REST_Controller {
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
$this->load->model('Dash_Board_Model');
|
||||
$this->load->model('PD_Model');
|
||||
|
||||
}
|
||||
|
||||
@ -105,5 +106,52 @@ class Dash_Board_Controller extends REST_Controller {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
public function alertPDTAT_get()
|
||||
{
|
||||
$pd_tat = $this->Dash_Board_Model->selectRecords('PD_TAT');
|
||||
//print_r($pd_tat);
|
||||
//die();
|
||||
$res_array = array();
|
||||
foreach ($pd_tat as $key => $value)
|
||||
{
|
||||
|
||||
|
||||
if($value['Allocated'] != "" && $value['Accepted'] == "")
|
||||
{
|
||||
$allocated_date = date_create($value['Allocated']);
|
||||
$accepted_date = $value['Accepted'] != "" ? date_create( $value['Accepted'] ) : date_create(date('y-m-d H:i:s'));
|
||||
$diff = date_diff($allocated_date,$accepted_date);
|
||||
|
||||
if( $diff->d )
|
||||
{
|
||||
|
||||
$res_array[$key]['pdid'] = $value['PD'];
|
||||
$res_array[$key]['allocated'] = $value['Allocated'];
|
||||
$res_array[$key]['accepted'] = $value['Accepted'];
|
||||
$res_array[$key]['comment'] = '###more than a day';
|
||||
$res_array[$key]['diff'] = $diff->format('%d days %H hrs %i mins %s secs');
|
||||
$res_array[$key]['tat'] = $value['tat'] ? $value['tat'] : 'TAT NOT DEFINED';
|
||||
$res_array[$key]['status'] = '****ALERT TAT BREACH*****';
|
||||
}
|
||||
else
|
||||
{
|
||||
$res_array[$key]['pdid'] = $value['PD'];
|
||||
$res_array[$key]['allocated'] = $value['Allocated'];
|
||||
$res_array[$key]['accepted'] = $value['Accepted'];
|
||||
$res_array[$key]['comment'] = '###same day ya..';
|
||||
$res_array[$key]['diff'] = $diff->format('%d days %H hrs %i mins %s secs');
|
||||
$res_array[$key]['tat'] = $value['tat'] ? $value['tat'] : 'TAT NOT DEFINED';
|
||||
$res_array[$key]['status'] = $diff->h < $value['tat'] ? 'NORMAL': '****ALERT TAT BREACH*****';
|
||||
|
||||
}
|
||||
//if($key == 10){ break;}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
print_r($res_array);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -58,7 +58,7 @@ class Entity_Management_Controller extends REST_Controller {
|
||||
|
||||
if(!isset($records['entity_id']))
|
||||
{
|
||||
$entity_id = $this->Entity_Management_Model->saveRecords($records,ENTITY);//insert user records and get userid
|
||||
$entity_id = $this->Entity_Management_Model->saveRecords($records,ENTITY);//insert user records and get entity_id
|
||||
|
||||
if($entity_id != '' || $entity_id != null)
|
||||
{
|
||||
|
||||
@ -631,8 +631,11 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
foreach($docs_to_be_collected as $docs_to_be_collected_key => $docs_to_be_collect)
|
||||
{
|
||||
$docs_to_be_collect['fk_pd_id'] = $pd_id;
|
||||
$this->PD_Model->saveRecords($docs_to_be_collect,PDDOCSTOBECOLLECTED);
|
||||
if($docs_to_be_collect['doc_name'] != null)
|
||||
{
|
||||
$docs_to_be_collect['fk_pd_id'] = $pd_id;
|
||||
$this->PD_Model->saveRecords($docs_to_be_collect,PDDOCSTOBECOLLECTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -755,7 +758,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
foreach($docs_to_be_collected as $pd_doc_key => $pd_doc_requirement)
|
||||
{
|
||||
if($pd_doc_requirement['pd_doc_to_be_collect_id'] != null || $pd_doc_requirement['pd_doc_to_be_collect_id'] != "")
|
||||
if($pd_doc_requirement['pd_doc_to_be_collect_id'] != null || $pd_doc_requirement['pd_doc_to_be_collect_id'] != "" && ($docs_to_be_collect['doc_name'] != null) )
|
||||
{
|
||||
$where_condition_array = array('pd_doc_to_be_collect_id' => $pd_doc_requirement['pd_doc_to_be_collect_id']);
|
||||
$pk_id = $this->PD_Model->updateRecords($pd_doc_requirement,PDDOCSTOBECOLLECTED,$where_condition_array);
|
||||
@ -763,9 +766,12 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
else
|
||||
{
|
||||
$pd_doc_requirement['fk_pd_id'] = $records['pdid'];
|
||||
$pk_id = $this->PD_Model->saveRecords($pd_doc_requirement,PDDOCSTOBECOLLECTED);
|
||||
if($pk_id != "" || $pk_id != null){ $count++; }
|
||||
if($pd_doc_requirement['doc_name'] != null)
|
||||
{
|
||||
$pd_doc_requirement['fk_pd_id'] = $records['pdid'];
|
||||
$pk_id = $this->PD_Model->saveRecords($pd_doc_requirement,PDDOCSTOBECOLLECTED);
|
||||
if($pk_id != "" || $pk_id != null){ $count++; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4457,37 +4463,42 @@ class PD_Controller extends REST_Controller {
|
||||
$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($pdid);
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
|
||||
//$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
$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;
|
||||
//echo $score_for_chart;
|
||||
|
||||
//GET phantom script from DB
|
||||
$phantom_script = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => PHANTOMJSSCRIPT_LOCATION),SCRIPTS);
|
||||
|
||||
$exact_script = $phantom_script[0]['script_content'];
|
||||
//print_r($exact_script);
|
||||
$apppath = str_replace('\\','/',$this->external_path.'/pd_reports/'.$pdid);
|
||||
$exact_script = str_replace('{{APPPATH}}',$apppath,$exact_script);
|
||||
$exact_script = str_replace('{{place_score_here}}',$score_for_chart,$exact_script);
|
||||
//print_r($exact_script);die();
|
||||
|
||||
|
||||
//GENERATE CHART PART
|
||||
file_put_contents(APPPATH.'/views/js/phantomchart.js',$exact_script,LOCK_EX);
|
||||
|
||||
$str = 'phantomjs '.APPPATH.'/views/js/phantomchart.js';
|
||||
exec($str,$ou);
|
||||
exec('phantom.exit();');
|
||||
|
||||
//print_r($ou);
|
||||
|
||||
$chart_img_path = $this->external_path.'/pd_reports/'. $pdid .'/chart.png';
|
||||
$type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
|
||||
$chart_img_content = file_get_contents($chart_img_path);
|
||||
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
|
||||
$data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url;
|
||||
|
||||
if($data['pd_master_details'][0]['is_score_card_enabled'] != 0)
|
||||
{
|
||||
$data['pd_score'] = $this->calculateScore($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;
|
||||
//echo $score_for_chart;
|
||||
|
||||
//GET phantom script from DB
|
||||
$phantom_script = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => PHANTOMJSSCRIPT_LOCATION),SCRIPTS);
|
||||
|
||||
$exact_script = $phantom_script[0]['script_content'];
|
||||
//print_r($exact_script);
|
||||
$apppath = str_replace('\\','/',$this->external_path.'/pd_reports/'.$pdid);
|
||||
$exact_script = str_replace('{{APPPATH}}',$apppath,$exact_script);
|
||||
$exact_script = str_replace('{{place_score_here}}',$score_for_chart,$exact_script);
|
||||
//print_r($exact_script);die();
|
||||
|
||||
|
||||
//GENERATE CHART PART
|
||||
file_put_contents(APPPATH.'/views/js/phantomchart.js',$exact_script,LOCK_EX);
|
||||
|
||||
$str = 'phantomjs '.APPPATH.'/views/js/phantomchart.js';
|
||||
exec($str,$ou);
|
||||
exec('phantom.exit();');
|
||||
|
||||
//print_r($ou);
|
||||
|
||||
$chart_img_path = $this->external_path.'/pd_reports/'. $pdid .'/chart.png';
|
||||
$type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
|
||||
$chart_img_content = file_get_contents($chart_img_path);
|
||||
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
|
||||
$data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url;
|
||||
}
|
||||
// echo $data['base64_pdscore_chart_url'];
|
||||
//die();
|
||||
//END OF GENERATE CHART PART
|
||||
@ -5512,21 +5523,21 @@ class PD_Controller extends REST_Controller {
|
||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||
//print_r($data['applicants_details']);die();
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
//$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
//$data['pd_score'] = $this->calculateScore($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
|
||||
//print_r($data['pd_score']);
|
||||
//die();
|
||||
//$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
|
||||
$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
|
||||
|
||||
// print_r($data['assessed_income_details']);
|
||||
// echo "**************************";
|
||||
//$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
|
||||
if($data['pd_master_details'][0]['is_score_card_enabled'] != 0)
|
||||
{
|
||||
$data['pd_score'] = $this->calculateScore($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;
|
||||
//echo $score_for_chart;die();
|
||||
$chart = null;
|
||||
if($chart)
|
||||
{
|
||||
|
||||
//GET phantom script from DB
|
||||
$phantom_script = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantomjs_local'),SCRIPTS);
|
||||
|
||||
@ -6644,7 +6655,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$imagetobewatermark = imagecreatefromstring(file_get_contents($output_file));
|
||||
$location_watermarktext="Location: ".$doc['link'];
|
||||
$font=APPPATH."docs/robold.ttf"; //metion font and it's location
|
||||
$font = APPPATH."docs/robold.ttf"; //metion font and it's location
|
||||
$fontsize="12";
|
||||
$x = imagesy($imagetobewatermark);
|
||||
$y = imagesy($imagetobewatermark);
|
||||
|
||||
@ -52,6 +52,7 @@ class AWS_S3
|
||||
return $result;
|
||||
} catch (AwsException $e) {
|
||||
//output error message if fails
|
||||
log_message('ERROR', $e->getMessage());
|
||||
return $e->getMessage();
|
||||
//echo "\n";
|
||||
}
|
||||
|
||||
@ -759,7 +759,7 @@ class PD_Model extends SPARQ_Model {
|
||||
*/
|
||||
public function getPDMasterDetails($pdid,$random_string = null)
|
||||
{
|
||||
$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:%s %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,OTPREJECTION.rejection_reason,PDTRIGGER.otp_reject_other_reason,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited,PDTRIGGER.is_zip_created,PDTRIGGER.pd_qc_note');
|
||||
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,ENTITY.is_score_card_enabled, 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:%s %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,OTPREJECTION.rejection_reason,PDTRIGGER.otp_reject_other_reason,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited,PDTRIGGER.is_zip_created,PDTRIGGER.pd_qc_note');
|
||||
$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');
|
||||
|
||||
@ -735,8 +735,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
<!-- ########################### Score Card Section ############################################### -->
|
||||
<?php
|
||||
$is_show_scorecard = 1;
|
||||
if($is_show_scorecard)
|
||||
|
||||
if( isset($pd_score) && count($pd_score))
|
||||
{
|
||||
|
||||
echo '<h2 contenteditable="true">PD Score Summary</h2>';
|
||||
@ -762,37 +762,37 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '<p><img src="'.$base64_pdscore_chart_url.'" style="width:600px;height:350px;"/></p>';
|
||||
|
||||
}
|
||||
else
|
||||
{ echo "<b>Score Chart Not Generated</b>"; }
|
||||
// else
|
||||
// { echo "<b>Score Chart Not Generated</b>"; }
|
||||
|
||||
|
||||
|
||||
//######################### CHART ###########################
|
||||
|
||||
|
||||
if(isset($dsc_cards['base64_dsc_business']))
|
||||
{
|
||||
echo "<br><br>";
|
||||
// if(isset($dsc_cards['base64_dsc_business']))
|
||||
// {
|
||||
// echo "<br><br>";
|
||||
|
||||
echo '<p><img src="'.$dsc_cards['base64_dsc_business'].'" style="width:600px;height:350px;"/></p>';
|
||||
// echo '<p><img src="'.$dsc_cards['base64_dsc_business'].'" style="width:600px;height:350px;"/></p>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "<b>Score Chart Not Generated</b>";
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //echo "<b>Score Chart Not Generated</b>";
|
||||
// }
|
||||
|
||||
if(isset($dsc_cards['base64_dsc_general']))
|
||||
{
|
||||
echo "<br><br>";
|
||||
// if(isset($dsc_cards['base64_dsc_general']))
|
||||
// {
|
||||
// echo "<br><br>";
|
||||
|
||||
echo '<p><img src="'.$dsc_cards['base64_dsc_general'].'" style="width:600px;height:350px;"/></p>';
|
||||
// echo '<p><img src="'.$dsc_cards['base64_dsc_general'].'" style="width:600px;height:350px;"/></p>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "<b>Score Chart Not Generated</b>";
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //echo "<b>Score Chart Not Generated</b>";
|
||||
// }
|
||||
|
||||
|
||||
echo "<div id='page_break'></div>";
|
||||
@ -1919,6 +1919,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php
|
||||
$businessFinancialResult = array();
|
||||
$financial_kuccha_info = array();
|
||||
$current_business_info = array();// only for IndusInd Lender
|
||||
$profit_loss_symbal = '<span style="font-family:DejaVu Sans; sans-serif;color:green;">↑</span> /<span style="font-family:DejaVu Sans; sans-serif;color:red;">↓</span>';
|
||||
|
||||
if(isset($pd_processed_forms[14][$business_count]))
|
||||
@ -1930,6 +1931,22 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$comments_on_financials = isset($businessFinancialRow['financial_reason']) ? $businessFinancialRow['financial_reason'] : '';
|
||||
//echo $financial_remarks;die();
|
||||
// statementdate_per_financial
|
||||
if(isset($businessFinancialRow['kuccha_records_shown']))
|
||||
{
|
||||
$financial_kuccha_info['kuccha_records_shown'] = $businessFinancialRow['kuccha_records_shown'];
|
||||
$financial_kuccha_info['kuccha_bill_allowed'] = $businessFinancialRow['kuccha_bill_allowed'];
|
||||
$financial_kuccha_info['customer_declared_turnover'] = $businessFinancialRow['customer_declared_turnover'];
|
||||
}
|
||||
|
||||
//only for Indusind Lender
|
||||
if(isset($businessFinancialRow['tot_business_FY']))
|
||||
{
|
||||
$current_business_info['tot_business_FY'] = $businessFinancialRow['tot_business_FY'];
|
||||
$current_business_info['remarks_tot_business_FY'] = $businessFinancialRow['remarks_tot_business_FY'];
|
||||
$current_business_info['orders_hand_FY'] = $businessFinancialRow['orders_hand_FY'];
|
||||
}
|
||||
|
||||
//print_r($financial_kuccha_info);die();
|
||||
if(strtoupper($businessFinancialRow['is_financial_statements'])=='YES' && count($businessFinancialRow['date_per_financial'])>0){
|
||||
$bindBusinessFinancial["company_name"] = MYUTIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
|
||||
//$bindBusinessFinancial["company_name"] .= count($businessFinancialRow['date_per_financial'])>1 ? ' provided with last '.count($businessFinancialRow['date_per_financial']).' years of financial statements and the snapshot is as below :' : ' we were provided with last '.count($businessFinancialRow['date_per_financial']).' year of financial statements and the snapshot is as below :';
|
||||
@ -2166,15 +2183,23 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(count($financial_kuccha_info))
|
||||
{
|
||||
echo '<p><strong>Validation of Customer Declared Financials :</strong></p>';
|
||||
echo 'Kuccha Record Seen (Yes/No) : ';echo $financialsncial_kuccha_info['kuccha_records_shown'] == 'yes' ? '' : 'No Kuccha Records made available to PD officer and therefore validation of customer declared financials was not possible.';
|
||||
echo 'Kuccha Record Seen (Yes/No) : ';echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : 'No Kuccha Records made available to PD officer and therefore validation of customer declared financials was not possible.';
|
||||
|
||||
if($financialsncial_kuccha_info['kuccha_records_shown'] == 'yes')
|
||||
if($financial_kuccha_info['kuccha_records_shown'] == 'yes')
|
||||
{
|
||||
echo 'Photograph of Kuchha Bills Allowed (Yes/No) : '. $financialsncial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report': 'No';
|
||||
echo '<br><br>Photograph of Kuchha Bills Allowed (Yes/No) : '. ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report': 'No');
|
||||
|
||||
echo 'Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. $financialsncial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': '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');
|
||||
}
|
||||
}
|
||||
|
||||
//only for Indusind Lender
|
||||
if(count($current_business_info))
|
||||
{
|
||||
echo '<p><strong>Current Business :</strong></p>';
|
||||
echo 'Approximate Total Business / Sales Done for Current FY as on date is '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($current_business_info['tot_business_FY']).' ( '. $current_business_info['remarks_tot_business_FY'] .' ) ';
|
||||
echo '<br>Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
|
||||
}
|
||||
?>
|
||||
<p><strong>Working Capital Cycle:</strong></p>
|
||||
<table class="scorecard_table">
|
||||
@ -3902,15 +3927,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$credit_officier_specific_queries = array();
|
||||
if(isset($pd_processed_forms[24])) {
|
||||
$credit_officier_specific_queries = json_decode($pd_processed_forms[24]['processed_json'],true);
|
||||
$credit_officier_specific_queries = json_decode($pd_processed_forms[24][0]['processed_json'],true);
|
||||
}
|
||||
//print_r($credit_officier_specific_queries);die();
|
||||
// echo 'CREDIT ********************';
|
||||
// print_r($data['pd_processed_forms'][24]);
|
||||
//print_r($credit_officier_specific_queries);
|
||||
if(count($credit_officier_specific_queries))
|
||||
{
|
||||
|
||||
if(count($credit_officier_specific_queries['additional_requirements_processed']))
|
||||
{
|
||||
echo '<p>A . Credit Officer Specific Queries:</p>';
|
||||
echo '<h3>A . Credit Officer Specific Queries:</h3>';
|
||||
echo '<br>';
|
||||
|
||||
foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value)
|
||||
@ -3923,17 +3950,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
if(count($credit_officier_specific_queries['docs_to_be_sighted_processed']))
|
||||
{
|
||||
echo '<p>B . Documents to be collected: </p>';
|
||||
echo '<h3>B . Documents to be collected: </h3>';
|
||||
echo '<br>';
|
||||
|
||||
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value)
|
||||
{
|
||||
echo 'Document Required : ' . $value['doc_name'].'<br>';
|
||||
echo 'Provided Yes / No : ' . $value['ans'].'<br>';
|
||||
echo 'Document Required : ' . $doc_value['doc_name'].'<br>';
|
||||
echo 'Provided Yes / No : ' . $doc_value['ans'].'<br>';
|
||||
if($value['ans'] == 'yes')
|
||||
{
|
||||
echo 'Document available in zipped file enclosed with report.';
|
||||
}else { echo 'Reason : ' .$value['reason']; }
|
||||
}else { echo 'Reason : ' .$doc_value['reason']; }
|
||||
echo '<br><br>';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user