Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
8ef5d250a7
@ -95,6 +95,11 @@ defined('ROUTE_LOGIN_W') OR define('ROUTE_LOGIN_W', 'saveSalesPDImage');
|
||||
defined('ROUTE_LOGIN_V') OR define('ROUTE_LOGIN_V', 'generateSatelliteImg'); // no errors
|
||||
defined('ROUTE_LOGIN_U') OR define('ROUTE_LOGIN_U', 'generateOTP');
|
||||
defined('ROUTE_LOGIN_T') OR define('ROUTE_LOGIN_T', 'verifyOTP');
|
||||
defined('ROUTE_LOGIN_S') OR define('ROUTE_LOGIN_S', 'purge_pddata');
|
||||
defined('ROUTE_LOGIN_F') OR define('ROUTE_LOGIN_F', 'previewDigiLockerDocs');
|
||||
// defined('ROUTE_LOGIN_F') OR define('ROUTE_LOGIN_F', 'downloadDigiLockerDocs');
|
||||
defined('ROUTE_LOGIN_E') OR define('ROUTE_LOGIN_E', 'getDigiLockerDocs');
|
||||
defined('ROUTE_LOGIN_D') OR define('ROUTE_LOGIN_D', 'saveFlyhiPDImage'); // no errors
|
||||
defined('ROUTE_LOGIN_C') OR define('ROUTE_LOGIN_C', 'getCreditPDReportforCETApp');
|
||||
defined('ROUTE_LOGIN_B') OR define('ROUTE_LOGIN_B', 'getSalesPDReportforCETApp');
|
||||
defined('ROUTE_LOGIN_A') OR define('ROUTE_LOGIN_A', 'getAuditedImages'); // no errors
|
||||
@ -128,6 +133,10 @@ defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','
|
||||
defined('CET_SALESPD_INTEGRATION_IMG_URL') OR define('CET_SALESPD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_IMG_URL') OR define('CET_CREDIT_PD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdPhotographsData');
|
||||
defined('DIGILOCKER_TOKEN_URI') OR define('DIGILOCKER_TOKEN_URI','https://api.digitallocker.gov.in/public/oauth2/1/token');
|
||||
defined('DIGILOCKER_FILESLIST_URI') OR define('DIGILOCKER_FILESLIST_URI','https://api.digitallocker.gov.in/public/oauth2/2/files/issued');
|
||||
defined('DIGILOCKER_GETFILE_URI') OR define('DIGILOCKER_GETFILE_URI','https://api.digitallocker.gov.in/public/oauth2/1/file/');
|
||||
|
||||
}
|
||||
else if(ENVIRONMENT == 'testing')
|
||||
{
|
||||
@ -150,6 +159,9 @@ else if(ENVIRONMENT == 'testing')
|
||||
defined('CET_SALESPD_INTEGRATION_IMG_URL') OR define('CET_SALESPD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_IMG_URL') OR define('CET_CREDIT_PD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdPhotographsData');
|
||||
defined('DIGILOCKER_TOKEN_URI') OR define('DIGILOCKER_TOKEN_URI','https://api.digitallocker.gov.in/public/oauth2/1/token');
|
||||
defined('DIGILOCKER_FILESLIST_URI') OR define('DIGILOCKER_FILESLIST_URI','https://api.digitallocker.gov.in/public/oauth2/2/files/issued');
|
||||
defined('DIGILOCKER_GETFILE_URI') OR define('DIGILOCKER_GETFILE_URI','https://api.digitallocker.gov.in/public/oauth2/1/file/');
|
||||
}
|
||||
else if(ENVIRONMENT == 'production')
|
||||
{
|
||||
@ -172,6 +184,9 @@ else if(ENVIRONMENT == 'production')
|
||||
defined('CET_SALESPD_INTEGRATION_IMG_URL') OR define('CET_SALESPD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_IMG_URL') OR define('CET_CREDIT_PD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdPhotographsData');
|
||||
defined('DIGILOCKER_TOKEN_URI') OR define('DIGILOCKER_TOKEN_URI','https://api.digitallocker.gov.in/public/oauth2/1/token');
|
||||
defined('DIGILOCKER_FILESLIST_URI') OR define('DIGILOCKER_FILESLIST_URI','https://api.digitallocker.gov.in/public/oauth2/2/files/issued');
|
||||
defined('DIGILOCKER_GETFILE_URI') OR define('DIGILOCKER_GETFILE_URI','https://api.digitallocker.gov.in/public/oauth2/1/file/');
|
||||
}
|
||||
|
||||
/*********************END of AWS resources Constants*************************************************/
|
||||
|
||||
@ -340,6 +340,14 @@ $route['disableformV2'] = 'Template_Management_Controller/disableformV2';
|
||||
$route['questionsV2'] = 'Template_Management_Controller/JSONquestionFilterV2';
|
||||
$route['getBuinessGroupForms'] = 'Template_Management_Controller/getBuinessGroupFormsV2';
|
||||
$route['getCompaniesListsForBusinessV2'] = 'PD_Controller/getCompaniesListsFromGeneralFormRawJSONV2';
|
||||
|
||||
// $route['getFIPDTemplate'] = 'Template_Management_Controller/getFIPDTemplate';
|
||||
$route['getFIPDImgDetails'] = 'Template_Management_Controller/FIPDPhotograph';
|
||||
$route['saveFIPDImg'] = 'Template_Management_Controller/saveFIPDPhotograph';
|
||||
|
||||
$route['FIformWiseTemplate'] = 'Template_Management_Controller/FIformWiseTemplate';
|
||||
$route['loadFiTemplate'] = 'Template_Management_Controller/loadFiTemplate';
|
||||
|
||||
## PDjson developers Testing Purposer
|
||||
$route['PDjson'] = 'PD_Controller/PDjson';
|
||||
|
||||
@ -370,14 +378,39 @@ $route['getEvent'] = 'GC_Event_Controller/getEventFromGoogleCalender';//dummy ch
|
||||
$route['createGmeetLink'] = 'PD_Controller/createGmeetLink'; //only developer testing, not for APP use
|
||||
$route['deleteCalenderEvent'] = 'PD_Controller/deleteCalenderEvent'; //only developer testing, not for APP use
|
||||
|
||||
$route['uploadSalesPDDataToCETApp/(:num)'] = 'Sales_PD_Controller/uploadSalesPDDataToCETApp';
|
||||
$route['getSalesPDReportforCETApp'] = 'Sales_PD_Controller/getSalesPDReportforCETApp';
|
||||
$route['uploadCreditPDDataToCETApp/(:num)'] = 'SMC_Credit_PD_Controller/uploadCreditPDDataToCETApp';
|
||||
$route['getCreditPDReportforCETApp'] = 'SMC_Credit_PD_Controller/getCreditPDReportforCETApp';
|
||||
|
||||
$route['faceMarkImage'] = 'PD_Controller/toMakeFaceBoundingBox';
|
||||
|
||||
$route['saveFlyhiPD'] = 'Flyhi_Controller/saveFlyhiPD';
|
||||
$route['listFlyhiPD'] = 'Flyhi_Controller/listFlyhiPD';
|
||||
$route['listFlyhiSalesPD'] = 'Flyhi_Controller/listFlyhiPD';
|
||||
$route['getFlyhiPD'] = 'Flyhi_Controller/getFlyhiPD';
|
||||
$route['getFlyhiPDSectionData'] = 'Flyhi_Controller/getFlyhiPD';
|
||||
$route['loadFlyhiPDTemplate'] = 'Flyhi_Controller/loadFlyhiPDTemplate';
|
||||
$route['(downloadFlyhiPDReport/:any)'] = 'Flyhi_Controller/getFlyhiPDReport';
|
||||
$route['getMasterForFlyhiPD'] = 'Flyhi_Controller/getMasterForFlyhiPD';
|
||||
$route['getFlyhiSalesPersonList'] = 'Flyhi_Controller/lenderSalesPersonForFlyhiPD';
|
||||
$route['getFlyhiCreditPersonList'] = 'Flyhi_Controller/lenderCreditPersonForFlyhiPD';
|
||||
$route['getFlyhiBranchList'] = 'Flyhi_Controller/branchMasterForFlyhiPD';
|
||||
$route['getFlyhiProductList'] = 'Flyhi_Controller/productMasterForFlyhiPD';
|
||||
$route['getFlyhiLenderList'] = 'Flyhi_Controller/lenderMasterForFlyhiPD';
|
||||
$route['saveFlyhiPDImage'] = 'Flyhi_Controller/saveFlyhiPDImage';
|
||||
$route['getFlyhiPDImgDataCusLink']='Flyhi_Controller/getFlyhiPDImgDataCusLink';
|
||||
$route['saveFlyhiPDsection'] = 'Flyhi_Controller/saveFlyhiPDsection';
|
||||
$route['filterFlyPDList']='Flyhi_Controller/filterFlyPDList';
|
||||
$route['regenerateFlyhiReport'] = 'Flyhi_Controller/regenerateFlyhiReport';
|
||||
|
||||
$route['getDigiLockerDocs']='Flyhi_Controller/getDigiLockerDocs';
|
||||
// $route['getDigiLockerDocs2']='Flyhi_Controller/getDigiLockerDos';
|
||||
$route['downloadDigiLockerDocs']='Flyhi_Controller/downloadDigiLockerDocs';
|
||||
|
||||
$route['archivePDSMCImages'] = 'SMC_Credit_PD_Controller/archivePDImages';
|
||||
$route['smcPhotoPDFDownload'] = 'SMC_Credit_PD_Controller/imgPDFDownload';
|
||||
$route['myFunction']='Flyhi_Controller/myFunction';
|
||||
$route['previewDigiLockerDocs']='Flyhi_Controller/previewDigiLockerDocs';
|
||||
|
||||
$route['purge_pddata']='Data_Dump_Controller/renamingExistingPDinfo';
|
||||
$route['checkjsonPD']='Data_Dump_Controller/checkjsonPD';
|
||||
$route['deleteS3Image']='Data_Dump_Controller/deleteS3Images';
|
||||
File diff suppressed because it is too large
Load Diff
@ -1221,6 +1221,16 @@ class Entity_Management_Controller extends REST_Controller {
|
||||
}
|
||||
$this->db->WHERE('isactive',1);
|
||||
$pd_types = $this->db->GET()->result_array();
|
||||
if(!empty($pd_types)){
|
||||
$field_investigation = array(array("field_investigation_id"=> 1,"field_investigation"=> "Office Visit (DI)"),array("field_investigation_id"=> 2,"field_investigation"=> "Office Visit (Sal)"),array("field_investigation_id"=> 3,"field_investigation"=> "Residence Visit"));
|
||||
for ($k = 0; $k < count($pd_types); $k++) {
|
||||
if($pd_types[$k]['pd_type_id'] == 4){
|
||||
$pd_types[$k]['field_investigation'] = $field_investigation;
|
||||
}else{
|
||||
$pd_types[$k]['field_investigation'] = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -267,6 +267,115 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
}
|
||||
function uploadCreditPDDataToCETApp_get()
|
||||
{
|
||||
log_message('ERROR', '#### upload SMC Credit PDData To CETApp Called');
|
||||
$smc_credit_pd = $this->uri->segment(2);
|
||||
$mater_details = $this->PD_Model->getPDMasterDetails($smc_credit_pd);
|
||||
$pd_section_data = $this->SMC_Credit_PD_Model->getSMCTemplateForPD($smc_credit_pd,$mater_details[0]['fk_product_id'],null,null,'REPORT');
|
||||
log_message('ERROR', '#### Total Credit PD is ' . count($pd_section_data));
|
||||
if (!empty($pd_section_data)) {
|
||||
$forms_data_to_be_get_direct_from_excel_sheet = array(3, 9, 10, 15);
|
||||
if (count($pd_section_data) > 0) {
|
||||
$common_fields = array('pdid'=>$mater_details[0]['pd_id'],
|
||||
'product'=>$mater_details[0]['product_abbr'],
|
||||
'caseno'=>$mater_details[0]['pd_sno']);
|
||||
foreach ($pd_section_data as $key => $value) {
|
||||
if (isset($value['json']) && $value['json'] != '') {
|
||||
$filter_form_id[$key] = $value['fk_form_id'];
|
||||
$CETAPP_creditPD_data[$value['form_name']] = $value['json'];
|
||||
} else {
|
||||
if (in_array($value['fk_form_id'], $forms_data_to_be_get_direct_from_excel_sheet)) {
|
||||
$data_from_excel = $this->loadDataFromExcelBusiProcess($mater_details, $value['fk_form_id']);
|
||||
$filter_form_id[$key] = $value['fk_form_id'];
|
||||
$CETAPP_creditPD_data[$value['form_name']] = $data_from_excel;
|
||||
}
|
||||
}
|
||||
}
|
||||
$photograph_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
$satellite_image = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1,'img_name=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
if(count($photograph_data)>0){
|
||||
for ($i = 0; $i < count($photograph_data); $i++){
|
||||
$img_fields = $common_fields;
|
||||
$img_fields['img_name'] = $photograph_data[$i]['img_name'];
|
||||
$img_split = explode( ',', $photograph_data[$i]['img']);
|
||||
$img_fields['img'] = $img_split[1];
|
||||
cet_creditpd::pushwithcetphotographapi($img_fields,$i);
|
||||
}}
|
||||
if(!empty($satellite_image)){
|
||||
$stt_fields = $common_fields;
|
||||
$stt_fields['img_name'] = $satellite_image[0]['img_name'];
|
||||
$stt_fields['img'] = $satellite_image[0]['img'];
|
||||
cet_creditpd::pushwithcetphotographapi($stt_fields,0);
|
||||
}
|
||||
if ($mater_details[0]['product_abbr'] == 'LFMP' && (array_key_exists("key_stakeholders",$pd_section_data[5])) ) {
|
||||
$LFMP_KeyStackholders = $pd_section_data[5]['key_stakeholders'];
|
||||
$temp_arr = [];
|
||||
for ($i = 0; $i < count($LFMP_KeyStackholders); $i++) {
|
||||
$value = $LFMP_KeyStackholders[$i];
|
||||
if (isset($value["stakeholder_name0"])) {
|
||||
$temp_arr[] = array(
|
||||
"company_name" => $value["company_name"], "stakeholder_name" => $value["stakeholder_name0"],
|
||||
"share_holding" => $value["share_holding0"], "vintage_in_current_biz" => $value["vintage_in_current_biz0"],
|
||||
"total_work_exp" => $value["total_work_exp0"], "started_biz" => $value["started_biz0"],
|
||||
"previous_experience_details" => (isset($value['previous_experience_details0']) ? $value['previous_experience_details0'] : '')
|
||||
);
|
||||
}
|
||||
if (isset($value["stakeholder_name1"])) {
|
||||
$temp_arr[] = array(
|
||||
"company_name" => $value["company_name"], "stakeholder_name" => $value["stakeholder_name1"],
|
||||
"share_holding" => $value["share_holding1"], "vintage_in_current_biz" => $value["vintage_in_current_biz1"],
|
||||
"total_work_exp" => $value["total_work_exp1"], "started_biz" => $value["started_biz1"],
|
||||
"previous_experience_details" => (isset($value['previous_experience_details1']) ? $value['previous_experience_details1'] : '')
|
||||
);
|
||||
}
|
||||
if (isset($value["stakeholder_name2"])) {
|
||||
$temp_arr[] = array(
|
||||
"company_name" => $value["company_name"],
|
||||
"stakeholder_name" => $value["stakeholder_name2"], "share_holding" => $value["share_holding2"],
|
||||
"vintage_in_current_biz" => $value["vintage_in_current_biz2"], "total_work_exp" => $value["total_work_exp2"], "started_biz" => $value["started_biz2"],
|
||||
"previous_experience_details" => (isset($value['previous_experience_details2']) ? $value['previous_experience_details2'] : '')
|
||||
);
|
||||
}
|
||||
$CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
|
||||
}
|
||||
} // ### LFMP key_stakeholders ends
|
||||
if ((in_array(1, $filter_form_id)) && (in_array(21, $filter_form_id)))
|
||||
// && (in_array(4,$filter_form_id)))
|
||||
{
|
||||
$officer_id = isset($mater_details[0]['fk_updatedby']) ? $mater_details[0]['fk_updatedby'] : '';
|
||||
$visit_date = isset($mater_details[0]['pd_visit_date']) ? $mater_details[0]['pd_visit_date'] : '';
|
||||
if (!empty($officer_id)) {
|
||||
$officer_details = $this->SMC_Credit_PD_Model->selectCustomRecords(array('userid as officer_id', 'email', 'mobile_no', 'concat(first_name," ",last_name) as officer'), array('userid' => $officer_id), USERPROFILE);
|
||||
if (!empty($officer_details)) {
|
||||
foreach ($officer_details as $key => $value) {
|
||||
$CETAPP_creditPD_data['Officer Details'] = $value;
|
||||
$CETAPP_creditPD_data['Officer Details']['pd_visit_date'] = $visit_date;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cet_creditpd::pushwithcetcreditpdapi($common_fields, $CETAPP_creditPD_data);
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['msg'] = 'Data Shared Successfully';
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
} else {
|
||||
log_message('ERROR', '#### There is No Data Found relevant Credit PDID ');
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'There is No Data Found relevant Credit PDID ! Try Later';
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
}
|
||||
} else {
|
||||
log_message('ERROR', '#### Can`t able Found the Credit PDID ');
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Can`t able Found the Creditpd PDID ! Try Later';
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
public function listSMCCreditPD_get()
|
||||
{
|
||||
@ -658,7 +767,13 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
$records['completed_date'] = date('Y-m-d H:i:s');
|
||||
//echo 'final';die();
|
||||
$id = $this->SMC_Credit_PD_Model->updateRecords($records,SMC_CREDIT_PD,array('smc_credit_pd' => $records['smc_credit_pd']));
|
||||
|
||||
log_message('ERROR','####COMPLETE SMC Credit PD = '.$records['smc_credit_pd']);
|
||||
// $random_string = $this->SMC_Credit_PD_Model->selectCustomRecords(array('rand_string'),array('smc_credit_pd' => $records['smc_credit_pd'],'isactive' => 1),SMC_CREDIT_PD);
|
||||
// $random_string = $random_string[0]['rand_string'];
|
||||
// $ZIP = smc_creditpd::covertSMCImgs2ZIP($records['smc_credit_pd'],$random_string,array(),0);
|
||||
// log_message('ERROR','####COMPLETE SMC IMAGE ZIP = '.$ZIP);
|
||||
// $PDF = smc_creditpd::covertSMCImgs2PDF($records['smc_credit_pd'],$random_string,array(),0);
|
||||
// log_message('ERROR','####COMPLETE SMC IMAGE PDF = '.$PDF);
|
||||
//$this->prepareSalesPDReport($records['smc_credit_pd'],false);
|
||||
// sleep(10);
|
||||
// log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$records['smc_credit_pd']);
|
||||
@ -1005,7 +1120,8 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
// }
|
||||
|
||||
// updatepdstatus
|
||||
// zip auto generate script
|
||||
public function testAPISalesPD_post()
|
||||
{
|
||||
//PDALERTS::sendSalesPDMail($this,32);die();
|
||||
@ -1522,18 +1638,13 @@ public function filterSalesPDList_post() {
|
||||
$this->load->helper('smc_creditpd');
|
||||
$this->load->helper('cet_creditpd');
|
||||
$this->load->helper('smcpdscore');
|
||||
$this->load->helper('report_attachments');
|
||||
|
||||
|
||||
$view_data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($records['pd_id']);
|
||||
$view_data['applicant_details'] = $this->PD_Model->getApplicantsDetails($records['pd_id']);
|
||||
//$pd_section_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'fk_pd_id' => $records['pd_id']),SMC_CREDIT_PD_SECTION_DATA,array(),'','fk_form_id','ASC');
|
||||
$pd_section_data = $this->SMC_Credit_PD_Model->getSMCTemplateForPD($records['pd_id'],$view_data['pd_master_details'][0]['fk_product_id'],null,null,'REPORT');
|
||||
//$common_fields = array('pdid'=>111,
|
||||
// 'product'=>$view_data['pd_master_details'][0]['product_abbr'],
|
||||
// 'caseno'=>'MWISE00840');
|
||||
$common_fields = array('pdid'=>$view_data['pd_master_details'][0]['pd_id'],
|
||||
'product'=>$view_data['pd_master_details'][0]['product_abbr'],
|
||||
'caseno'=>$view_data['pd_master_details'][0]['pd_sno']);
|
||||
// print_r($pd_section_data);die();
|
||||
$forms_data_to_be_get_direct_from_excel_sheet = array(3,9,10,15);
|
||||
|
||||
@ -1552,8 +1663,6 @@ public function filterSalesPDList_post() {
|
||||
$filter_form_id[$key] = $value['fk_form_id'];
|
||||
// if($value['fk_form_id'] == 2){print_r($value['json']);die();}
|
||||
$view_data['pd_section_data'][$value['fk_form_id']] = $value['json'];
|
||||
$CETAPP_creditPD_data[$value['form_name']] = $value['json'];
|
||||
// $CETAPP_creditPD_data[$value['fk_form_id']] = $value['json'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1564,9 +1673,6 @@ public function filterSalesPDList_post() {
|
||||
//print_r($data_from_excel);die();
|
||||
$view_data['pd_section_data'][$value['fk_form_id']] = $data_from_excel;
|
||||
$filter_form_id[$key] = $value['fk_form_id'];
|
||||
$CETAPP_creditPD_data[$value['form_name']] = $data_from_excel;
|
||||
// $CETAPP_creditPD_data[$value['fk_form_id']]= $data_from_excel;
|
||||
|
||||
}
|
||||
}
|
||||
//die();
|
||||
@ -1577,21 +1683,6 @@ public function filterSalesPDList_post() {
|
||||
// print_r($view_data['pd_section_data'][15]);die();
|
||||
$view_data['smc_images'] = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $records['pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
$view_data['satellite'] = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $records['pd_id'],'isactive' => 1,'img_name=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
if(count($view_data['smc_images'])>0){
|
||||
for ($i = 0; $i < count($view_data['smc_images']); $i++){
|
||||
$img_fields = $common_fields;
|
||||
$img_fields['img_name'] = $view_data['smc_images'][$i]['img_name'];
|
||||
$img_split = explode( ',', $view_data['smc_images'][$i]['img']);
|
||||
$img_fields['img'] = $img_split[1];
|
||||
// $img_fields[0]['img'] = $view_data['section9'][$i]['img'];
|
||||
cet_creditpd::pushwithcetphotographapi($img_fields,$i);
|
||||
}}
|
||||
if(!empty($view_data['satellite'])){
|
||||
$stt_fields = $common_fields;
|
||||
$stt_fields['img_name'] = $view_data['satellite'][0]['img_name'];
|
||||
$stt_fields['img'] = $view_data['satellite'][0]['img'];
|
||||
cet_creditpd::pushwithcetphotographapi($stt_fields,0);
|
||||
}
|
||||
// print_r($view_data['smc_images']);die();
|
||||
//print_r(count($view_data['smc_images']));die();
|
||||
|
||||
@ -1663,28 +1754,9 @@ public function filterSalesPDList_post() {
|
||||
}
|
||||
}
|
||||
$view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr;
|
||||
$CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
|
||||
// $CETAPP_creditPD_data[5]['key_stakeholders'] = $temp_arr;
|
||||
}// ### LFMP key_stakeholders ends
|
||||
// log_message('ERROR',"SUSEEN".json_encode($CETAPP_creditPD_data));die();
|
||||
if((in_array(1,$filter_form_id)) && (in_array(21,$filter_form_id)))
|
||||
// && (in_array(4,$filter_form_id)))
|
||||
{
|
||||
$officer_id = isset($view_data['pd_master_details'][0]['fk_updatedby']) ? $view_data['pd_master_details'][0]['fk_updatedby'] : '';
|
||||
$visit_date = isset($view_data['pd_master_details'][0]['pd_visit_date']) ? $view_data['pd_master_details'][0]['pd_visit_date'] : '';
|
||||
if(!empty($officer_id)){
|
||||
$officer_details = $this->SMC_Credit_PD_Model->selectCustomRecords(array('userid as officer_id', 'email','mobile_no','concat(first_name," ",last_name) as officer'),array('userid' => $officer_id),USERPROFILE);
|
||||
if(!empty($officer_details)){
|
||||
foreach($officer_details as $key=>$value) {
|
||||
$CETAPP_creditPD_data['Officer Details'] = $value;
|
||||
$CETAPP_creditPD_data['Officer Details']['pd_visit_date'] = $visit_date;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cet_creditpd::pushwithcetcreditpdapi($common_fields,$CETAPP_creditPD_data);
|
||||
|
||||
|
||||
$view_data['report_attachments'] = (new report_attachments)->getSMCReportAttchments($records['pd_id'],$view_data['pd_master_details'][0]['random_string'],$view_data['pd_master_details']);
|
||||
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == "NBFC/MFI"){
|
||||
$html_content = $this->load->view('smc_creditpd_reports/NBFC',$view_data,true);
|
||||
@ -1948,6 +2020,55 @@ public function filterSalesPDList_post() {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
public function archivePDImages_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$pdid = $records['pd_id'];
|
||||
$random_string = $records['random_string'];
|
||||
$regenerate = isset($records['regenerate']) ? $records['regenerate'] : 0;
|
||||
|
||||
$this->load->helper('smc_creditpd');
|
||||
$res_data = smc_creditpd::covertSMCImgs2ZIP($pdid,$random_string,array(),$regenerate);
|
||||
|
||||
if(!empty($res_data)){
|
||||
$response_data['dataStatus'] = true;
|
||||
$response_data['status'] = REST_Controller::HTTP_OK;
|
||||
$response_data['records'] = $res_data;
|
||||
} else {
|
||||
$response_data['dataStatus'] = false;
|
||||
$response_data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$response_data['msg'] = 'NO Image Found';
|
||||
}
|
||||
$this->response($response_data,REST_Controller::HTTP_OK);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function imgPDFDownload_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$this->load->helper('smc_creditpd');
|
||||
|
||||
$pdid = $records['pd_id'];
|
||||
$random_string = $records['random_string'];
|
||||
$regenerate = isset($records['regenerate']) ? $records['regenerate'] : 0;
|
||||
|
||||
$res_data = smc_creditpd::covertSMCImgs2PDF($pdid,$random_string,array(),$regenerate);
|
||||
|
||||
if(!empty($res_data)){
|
||||
$response_data['dataStatus'] = true;
|
||||
$response_data['status'] = REST_Controller::HTTP_OK;
|
||||
$response_data['records'] = $res_data;
|
||||
} else {
|
||||
$response_data['dataStatus'] = false;
|
||||
$response_data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$response_data['msg'] = 'NO Image Found';
|
||||
}
|
||||
$this->response($response_data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -205,63 +205,17 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
$all_section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $sales_pd_id,'isactive' => 1),SALESPD_SECTION_DATA,array(),'','section_id','ASC');
|
||||
// print_r(json_decode($all_section_data[0]['section_data'],true));die();
|
||||
$view_data['master'] = $sales_pd_data;
|
||||
$common_fields = array('pdid'=>$sales_pd_data[0]['sales_pd_id'],
|
||||
'product'=>$sales_pd_data[0]['abbr'],
|
||||
'caseno'=>$sales_pd_data[0]['sales_pd_sno']);
|
||||
foreach ($all_section_data as $sec_key => $section)
|
||||
{
|
||||
// print_r($section['section_id']);die();
|
||||
// log_message('ERROR','####PREPARE SALESPD REPORT CALLED'.$sales_pd_id);
|
||||
$view_data['section'.$section['section_id'] ] = $this->processSalesPDJSON($section);//die();
|
||||
$section_fields['section'.$section['section_id'] ] = $this->processSalesPDJSON($section);
|
||||
}
|
||||
// print_r($view_data['section3']);die();
|
||||
$view_data['section9'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
if(count($view_data['section9'])>0){
|
||||
for ($i = 0; $i < count($view_data['section9']); $i++){
|
||||
$img_fields = $common_fields;
|
||||
$img_fields['img_name'] = $view_data['section9'][$i]['img_name'];
|
||||
$img_split = explode( ',', $view_data['section9'][$i]['img']);
|
||||
$img_fields['img'] = $img_split[1];
|
||||
// $img_fields[0]['img'] = $view_data['section9'][$i]['img'];
|
||||
cet_salespd::pushwithcetphotographapi($img_fields,$i);
|
||||
}
|
||||
// "section9":{"selfie_with_person_met":"SAVED","approach_to_pd_location":["SAVED",""],"name_board_seen":["SAVED",""],"stock_image":["SAVED","SAVED","SAVED","SAVED",""],"workplace_interior_image":["SAVED","SAVED",""]}}
|
||||
// $arr1 =array();$arr2 =array();
|
||||
//for ($i = 0; $i < count($view_data['section9']); $i++){
|
||||
// $img_name = $view_data['section9'][$i]['img_name'];
|
||||
// if(!in_array($img_name, $arr1)){
|
||||
// array_push($arr1,$img_name);
|
||||
// }
|
||||
// $k = array_search($img_name, $arr1); //$k = 1;
|
||||
// $arr2[$k][] = $view_data['section9'][$i]['img'];
|
||||
// for ($j = 0; $j < count($arr1); $j++) {
|
||||
// $section_fields['section9'][$arr1[$j]] = $arr2[$j];
|
||||
// }
|
||||
//}
|
||||
}
|
||||
// cet_salespd::pushwithcetsalespdapi($common_fields,$section_fields,1);
|
||||
$CETAPP_salesPD_data = $section_fields;
|
||||
$officer_name = isset($CETAPP_salesPD_data['section8']['name_of_sales_team_member']) ? $CETAPP_salesPD_data['section8']['name_of_sales_team_member'] : '';
|
||||
if(!empty($officer_name)){
|
||||
$officer_details = $this->Sales_PD_Model->selectCustomRecords(array('userid as officer_id', 'email','mobile_no','concat(first_name," ",last_name) as officer_full_name'),array('first_name' => $officer_name),USERPROFILE);
|
||||
if(!empty($officer_details)){
|
||||
foreach($officer_details as $key=>$value) {
|
||||
$CETAPP_salesPD_data['section8'] = array_merge($section_fields['section8'],$value);
|
||||
}
|
||||
}
|
||||
}
|
||||
cet_salespd::pushwithcetsalespdapi($common_fields,$CETAPP_salesPD_data,1);
|
||||
$view_data['satellite_image'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
if(!empty($view_data['satellite_image'])){
|
||||
$stt_fields = $common_fields;
|
||||
$stt_fields['img_name'] = $view_data['satellite_image'][0]['img_name'];
|
||||
$stt_fields['img'] = $view_data['satellite_image'][0]['img'];
|
||||
cet_salespd::pushwithcetphotographapi($stt_fields);
|
||||
}
|
||||
$view_data['product_id'] = $sales_pd_data[0]['product_id'];
|
||||
$view_data['geo_location'] = $sales_pd_data[0]['geo_location'];
|
||||
// die();
|
||||
//print_r($this->db->last_query());die();
|
||||
//$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr'];
|
||||
$view_name = $sales_pd_data[0]['short_name'];if( $sales_pd_data[0]['abbr'] == 'MEQ'){ $view_name = $sales_pd_data[0]['abbr']; }
|
||||
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
|
||||
@ -316,6 +270,100 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function uploadSalesPDDataToCETApp_get()
|
||||
{
|
||||
log_message('ERROR','#### upload SalesPDData To CETApp Called');
|
||||
$sales_pd_id = $this->uri->segment(2);
|
||||
if(!empty($sales_pd_id)){
|
||||
log_message('ERROR','#### Sales PD = '.$sales_pd_id);
|
||||
$columns = array('SALES_PD_DATA.*','ENTITY.short_name','PRODUCT.abbr','USERPROFILE.smc_emp_code');
|
||||
$table = SALES_PD_DATA.' as SALES_PD_DATA';
|
||||
$joins = array(
|
||||
array('table' => ENTITY. ' as ENTITY',
|
||||
'condition' =>'SALES_PD_DATA.lender_id = ENTITY.entity_id',
|
||||
'jointype' => 'INNER'),
|
||||
array('table' => PRODUCTS. ' as PRODUCT',
|
||||
'condition' =>'SALES_PD_DATA.product_id = PRODUCT.product_id',
|
||||
'jointype' => 'INNER'),
|
||||
array('table' => USERPROFILE. ' as USERPROFILE',
|
||||
'condition' =>'SALES_PD_DATA.createdby = USERPROFILE.userid',
|
||||
'jointype' => 'LEFT')
|
||||
);
|
||||
|
||||
$where_condition_array = array('SALES_PD_DATA.sales_pd_id' => $sales_pd_id);
|
||||
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array);
|
||||
log_message('ERROR','#### Total Sales PD is '.count($sales_pd_data));
|
||||
if(count($sales_pd_data)>0)
|
||||
{
|
||||
$all_section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $sales_pd_id,'isactive' => 1),SALESPD_SECTION_DATA,array(),'','section_id','ASC');
|
||||
|
||||
$common_fields = array('pdid'=>$sales_pd_data[0]['sales_pd_id'],
|
||||
'product'=>$sales_pd_data[0]['abbr'],
|
||||
'caseno'=>$sales_pd_data[0]['sales_pd_sno']);
|
||||
|
||||
foreach ($all_section_data as $sec_key => $section)
|
||||
{
|
||||
$section_fields['section'.$section['section_id'] ] = $this->processSalesPDJSON($section);
|
||||
}
|
||||
|
||||
$photograph_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
|
||||
if(count($photograph_data)>0){
|
||||
for ($i = 0; $i < count($photograph_data); $i++){
|
||||
$img_fields = $common_fields;
|
||||
$img_fields['img_name'] = $photograph_data[$i]['img_name'];
|
||||
$img_split = explode( ',', $photograph_data[$i]['img']);
|
||||
$img_fields['img'] = $img_split[1];
|
||||
// $img_fields[0]['img'] = $photograph_data[$i]['img'];
|
||||
cet_salespd::pushwithcetphotographapi($img_fields,$i);
|
||||
}
|
||||
}
|
||||
|
||||
// cet_salespd::pushwithcetsalespdapi($common_fields,$section_fields,1);
|
||||
$CETAPP_salesPD_data = $section_fields;
|
||||
$officer_name = isset($CETAPP_salesPD_data['section8']['name_of_sales_team_member']) ? $CETAPP_salesPD_data['section8']['name_of_sales_team_member'] : '';
|
||||
if(!empty($officer_name)){
|
||||
$officer_details = $this->Sales_PD_Model->selectCustomRecords(array('userid as officer_id', 'email','mobile_no','concat(first_name," ",last_name) as officer_full_name'),array('first_name' => $officer_name),USERPROFILE);
|
||||
if(!empty($officer_details)){
|
||||
foreach($officer_details as $key=>$value) {
|
||||
$CETAPP_salesPD_data['section8'] = array_merge($section_fields['section8'],$value);
|
||||
}
|
||||
}
|
||||
}
|
||||
cet_salespd::pushwithcetsalespdapi($common_fields,$CETAPP_salesPD_data,1);
|
||||
|
||||
$satellite_image = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
if(!empty($satellite_image)){
|
||||
$stt_fields = $common_fields;
|
||||
$stt_fields['img_name'] = $satellite_image[0]['img_name'];
|
||||
$stt_fields['img'] = $satellite_image[0]['img'];
|
||||
cet_salespd::pushwithcetphotographapi($stt_fields,0);
|
||||
}
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['msg'] = 'Data Shared Successfully';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_message('ERROR','#### There is No Data Found relevant Sales PDID ');
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'There is No Data Found relevant Sales PDID ! Try Later';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
}else{
|
||||
log_message('ERROR','#### Can`t able Found the Sales PDID ');
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Can`t able Found the Sales PDID ! Try Later';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
public function getSalesPDReport_get()
|
||||
{
|
||||
$sales_pd_id = $this->uri->segment(2);
|
||||
@ -904,8 +952,10 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
//make inactive previous records
|
||||
$check=$this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' =>$sales_pd_id,'section_id' => $section_id,'isactive' => 1 ),SALESPD_SECTION_DATA);
|
||||
if(count($check)>0){
|
||||
$this->Sales_PD_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('sales_pd_id' =>$sales_pd_id,'section_id' => $section_id ));
|
||||
|
||||
}
|
||||
//insert new record
|
||||
$fields = array('sales_pd_id' => $sales_pd_id, 'section_id' => $section_id, 'status' =>$status ,'section_data' => $section_data,'createdby' => $fk_createdby);
|
||||
$is_entry_created = $this->Sales_PD_Model->saveRecords($fields,SALESPD_SECTION_DATA);
|
||||
@ -932,62 +982,64 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$section_data = array();
|
||||
|
||||
|
||||
if(!is_numeric($records['section_id'])){
|
||||
// echo "i am here if";
|
||||
// die();
|
||||
$fields=array('id','sales_pd_id','section_id','status','createdby','createdon');
|
||||
if($records['section_id'] == 'data'){ $fields[] = 'section_data'; }
|
||||
$section_data=$this->Sales_PD_Model->selectCustomRecords($fields,array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA);
|
||||
}
|
||||
else{
|
||||
// echo "i am here else";
|
||||
$section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => $records['section_id']),SALESPD_SECTION_DATA);
|
||||
//print_r( json_decode($section_data[0]['section_data'],true));die();
|
||||
if($records['section_id'] == 9 && count($section_data))
|
||||
{
|
||||
$all_sales_pd_images = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
//print_r($all_sales_pd_images);die();
|
||||
$photo_questions = (json_decode(($section_data[0]['section_data']),true));
|
||||
// print_r($photo_questions);
|
||||
foreach ($photo_questions['questions'] as $key => $value)
|
||||
{
|
||||
if(isset($value['answer_value']) && $value['answer_value'] && !$value['is_repeatable'])
|
||||
{
|
||||
$selfie = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name' => 'selfie_with_person_met','isactive' => 1),SALEPD_DOCS);
|
||||
if(count($selfie))
|
||||
{
|
||||
$photo_questions['questions'][$key]['answer_value'] = $selfie[0]['img'];
|
||||
//$photo_questions['questions'][$key]['answer_value'] = "CHNAGED";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// // echo "section_data";
|
||||
// // // print_r($section_data);
|
||||
// // //print_r( json_decode($section_data[0]['section_data'],true));die();
|
||||
// // if($records['section_id'] == 9 && count($section_data))
|
||||
// // {
|
||||
// // $all_sales_pd_images = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
|
||||
// // $photo_questions = (json_decode(($section_data[0]['section_data']),true));
|
||||
// // // print_r($photo_questions);
|
||||
// // foreach ($photo_questions['questions'] as $key => $value)
|
||||
// // {
|
||||
// // if(isset($value['answer_value']) && $value['answer_value'] && !$value['is_repeatable'])
|
||||
// // {
|
||||
// // $selfie = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name' => 'selfie_with_person_met','isactive' => 1),SALEPD_DOCS);
|
||||
// // if(count($selfie))
|
||||
// // {
|
||||
// // $photo_questions['questions'][$key]['answer_value'] = $selfie[0]['img'];
|
||||
// // //$photo_questions['questions'][$key]['answer_value'] = "CHNAGED";
|
||||
// // }
|
||||
// // }
|
||||
// // else
|
||||
// // {
|
||||
|
||||
foreach ($value['questions_group'] as $v_key => $individual_value)
|
||||
{
|
||||
//print_r($individual_value);die();
|
||||
//if($individual_value['questions'][0]['answer_value'])
|
||||
if(isset($individual_value['questions'][0]['answer_value']))
|
||||
{
|
||||
//iterate all_sales_pd_images to get one
|
||||
foreach ($all_sales_pd_images as $img_key => $img_value)
|
||||
{
|
||||
if($individual_value['questions'][0]['question_key'] == $img_value['img_name'])
|
||||
{
|
||||
$photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['answer_value'] = $img_value['img'];
|
||||
//$photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['answer_value'] = "CHANGED";
|
||||
unset($all_sales_pd_images[$img_key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//die();
|
||||
$photo_questions = json_encode($photo_questions);
|
||||
$section_data[0]['section_data'] = $photo_questions;
|
||||
}
|
||||
// // foreach ($value['questions_group'] as $v_key => $individual_value)
|
||||
// // {
|
||||
// // //print_r($individual_value);die();
|
||||
// // //if($individual_value['questions'][0]['answer_value'])
|
||||
// // if(isset($individual_value['questions'][0]['answer_value']))
|
||||
// // {
|
||||
// // //iterate all_sales_pd_images to get one
|
||||
// // foreach ($all_sales_pd_images as $img_key => $img_value)
|
||||
// // {
|
||||
// // if($individual_value['questions'][0]['question_key'] == $img_value['img_name'])
|
||||
// // {
|
||||
// // $photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['answer_value'] = $img_value['img'];
|
||||
// // //$photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['answer_value'] = "CHANGED";
|
||||
// // unset($all_sales_pd_images[$img_key]);
|
||||
// // break;
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // //die();
|
||||
// // $photo_questions = json_encode($photo_questions);
|
||||
// $section_data[0]['section_data'] = $photo_questions;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ -1137,7 +1189,8 @@ public function filterSalesPDList_post() {
|
||||
|
||||
$sales_pd_master_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('rand_string' => $rand_string),SALES_PD_DATA);
|
||||
$product_short_name = $this->Sales_PD_Model->selectCustomRecords(array('abbr'),array('product_id' => $sales_pd_master_data[0]['product_id']),PRODUCTS);
|
||||
$sales_pd_img_data = $this->Sales_PD_Model->selectCustomRecords(array('doc_id', 'fk_sales_pd_id','img','img_name','isactive'),array('fk_sales_pd_id' => $sales_pd_master_data[0]['sales_pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SALEPD_DOCS);
|
||||
$is_flyhi_pd = ($sales_pd_master_data[0]['sales_pd_type'] == "3" || $sales_pd_master_data[0]['sales_pd_type'] == "4") ? 1 : 0 ;
|
||||
$sales_pd_img_data = $this->Sales_PD_Model->selectCustomRecords(array('doc_id', 'fk_sales_pd_id','img','img_name','location','isactive'),array('fk_sales_pd_id' => $sales_pd_master_data[0]['sales_pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SALEPD_DOCS);
|
||||
|
||||
// print_r($product_short_name);die();
|
||||
//sales tele pd img structure array
|
||||
@ -1159,21 +1212,22 @@ public function filterSalesPDList_post() {
|
||||
//echo "SEC LOOP****";
|
||||
if($key == $sales_pd_img_data_value['img_name'])
|
||||
{
|
||||
|
||||
if($value['is_multiple'])
|
||||
{
|
||||
if(!array_key_exists($key,$img_data))
|
||||
{
|
||||
$img_data[$key] = array('img_key' => $key,'img_name' => $value['img_name'],'img_data' => [array('img_url' => $sales_pd_img_data_value['img'] ? $sales_pd_img_data_value['img'] : '')],'is_multiple' => 1,'section_heading' => $value['img_name']);
|
||||
$img_data[$key] = array('img_key' => $key,'img_name' => $value['img_name'],'img_data' => [array('img_url' => $sales_pd_img_data_value['img'] ? $sales_pd_img_data_value['img'] : '','img_id'=>($sales_pd_img_data_value['doc_id']) ? $sales_pd_img_data_value['doc_id'] : '','location'=>($sales_pd_img_data_value['location']) ? $sales_pd_img_data_value['location'] : '')],'is_multiple' => 1,'section_heading' => $value['img_name']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$img_data[$key]['img_data'][] = array('img_url' => $sales_pd_img_data_value['img'] ? $sales_pd_img_data_value['img'] : '');
|
||||
$img_data[$key]['img_data'][] = array('img_url' => $sales_pd_img_data_value['img'] ? $sales_pd_img_data_value['img'] : '','img_id'=>($sales_pd_img_data_value['doc_id']) ? $sales_pd_img_data_value['doc_id'] : '','location'=>($sales_pd_img_data_value['location']) ? $sales_pd_img_data_value['location'] : '');
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$img_data[$key] = array('img_key' => $key,'img_name' => $value['img_name'],'img_url' => $sales_pd_img_data_value['img'] ? $sales_pd_img_data_value['img'] : '','is_multiple' => 0,'section_heading' => $value['img_name']);//$sales_pd_img_data_value['img']
|
||||
$img_data[$key] = array('img_key' => $key,'img_name' => $value['img_name'],'img_url' => $sales_pd_img_data_value['img'] ? $sales_pd_img_data_value['img'] : '','is_multiple' => 0,'section_heading' => $value['img_name'],'img_id'=>($sales_pd_img_data_value['doc_id']) ? $sales_pd_img_data_value['doc_id'] : '','location'=>($sales_pd_img_data_value['location']) ? $sales_pd_img_data_value['location'] : '');//$sales_pd_img_data_value['img']
|
||||
}
|
||||
|
||||
unset($sales_pd_img_data[$sales_pd_img_data_key]);
|
||||
@ -1227,12 +1281,12 @@ public function filterSalesPDList_post() {
|
||||
{
|
||||
if($value['is_multiple'])
|
||||
{
|
||||
$img_data[] = array('img_key' => $key,'img_name' => $value['img_name'],'img_data' => array(),'is_multiple' => 1,'section_heading' => $value['img_name']);
|
||||
$img_data[] = array('img_key' => $key,'img_name' => $value['img_name'],'img_data' => array(),'is_multiple' => 1,'section_heading' => $value['img_name'],'img_id'=>$value['doc_id']);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$img_data[] = array('img_key' => $key,'img_name' => $value['img_name'],'img_url' => '','is_multiple' => 0,'section_heading' => $value['img_name']);
|
||||
$img_data[] = array('img_key' => $key,'img_name' => $value['img_name'],'img_url' => '','is_multiple' => 0,'section_heading' => $value['img_name'],'img_id'=>$value['doc_id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1415,6 +1469,14 @@ public function filterSalesPDList_post() {
|
||||
$data = $this->Sales_PD_Model->testSaleSection(527);
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
public function checksalesPD_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => $records['section_id']),SALESPD_SECTION_DATA);
|
||||
print_r(json_decode($section_data[0]['section_data'],true));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ class Template_Management_Controller extends REST_Controller {
|
||||
parent::__construct();
|
||||
$this->load->model('PD_Model');
|
||||
$this->load->model('Template_Management_Model');
|
||||
$this->external_path = $this->config->item('external_data_path');
|
||||
|
||||
}
|
||||
|
||||
@ -1223,11 +1224,13 @@ class Template_Management_Controller extends REST_Controller {
|
||||
$client = "";
|
||||
$random_string = "";
|
||||
$api = "";
|
||||
$fi_id = "";
|
||||
|
||||
if($this->get('pd_id')) { $pd_id = $this->get('pd_id'); }
|
||||
if($this->get('client')) { $client = $this->get('client'); }
|
||||
if($this->get('random_string')) { $random_string = $this->get('random_string'); }
|
||||
if($this->get('api')) { $api = $this->get('api'); }
|
||||
if($this->get('fi_id')) {$fi_id = $this->get('fi_id');}
|
||||
|
||||
if($pd_id != "" || $pd_id != null)
|
||||
{
|
||||
@ -1268,7 +1271,6 @@ class Template_Management_Controller extends REST_Controller {
|
||||
|
||||
$map_id = $_GET['map_id'];
|
||||
$form_id = $_GET['form_id'];
|
||||
$form_id = $_GET['form_id'];
|
||||
$template_id = isset($_GET['template_id'])?$_GET['template_id']:null;
|
||||
$fields = array('id','json');
|
||||
// if($template_id){$where_condition_array = array('map_id'=>$map_id,"form_id"=>$form_id,"is_form_status"=>"COMPLETED","id"=>$template_id);}
|
||||
@ -1612,4 +1614,265 @@ class Template_Management_Controller extends REST_Controller {
|
||||
$form_template = $this->Template_Management_Model->getBuinessFormTemplate($form_id);
|
||||
return $form_template;
|
||||
}
|
||||
|
||||
public function loadFITemplate_get()
|
||||
{
|
||||
$pd_id = "";
|
||||
$client = "";
|
||||
$random_string = "";
|
||||
$api = "";
|
||||
$FI_id = "";
|
||||
|
||||
if ($this->get('pd_id')) {
|
||||
$pd_id = $this->get('pd_id');
|
||||
}
|
||||
if ($this->get('client')) {
|
||||
$client = $this->get('client');
|
||||
}
|
||||
if ($this->get('random_string')) {
|
||||
$random_string = $this->get('random_string');
|
||||
}
|
||||
if ($this->get('api')) {
|
||||
$api = $this->get('api');
|
||||
}
|
||||
if ($this->get('fi_id')) {
|
||||
$FI_id = $this->get('fi_id');
|
||||
}
|
||||
|
||||
if ($pd_id != "" || $pd_id != null) {
|
||||
|
||||
$template_details = $this->PD_Model->getFITemplateForPD($pd_id, $client, $random_string, $api,$FI_id);
|
||||
if (count($template_details)) {
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $template_details;
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
} else {
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Template Not for PD ID' . $pd_id;
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
}
|
||||
} else {
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_BAD_REQUEST;
|
||||
$data['msg'] = 'No Param Available';
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
public function FIformWiseTemplate_get(){
|
||||
if((!isset($_GET['form_id'])) )
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'Key Missing! Please Check again both form-id';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}else{
|
||||
|
||||
$form_id = $_GET['form_id'];
|
||||
$fields = array('pd_form_id','pd_form_name','form_template');
|
||||
|
||||
$where_condition_array = array("form_id"=>$form_id,'isactive'=>1);
|
||||
$json_table = $this->Template_Management_Model->selectCustomRecords($fields,$where_condition_array,PDFORMS);
|
||||
if(count($json_table)>0){
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['json'] = $json_table;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
|
||||
$data['msg'] = 'FI-PD JSON Not Available for Given Form ID ! ';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function saveFIPDPhotograph_post()
|
||||
{
|
||||
|
||||
$records = $this->post('records');
|
||||
if ($records['pd_document_id'] != null && $records['pd_document_id'] != "") {
|
||||
$where_condition_array = array('pd_document_id' => $records['pd_document_id']);
|
||||
$to_update = array("pd_image_alias_name" => $records['pd_image_alias_name']);
|
||||
$res['count'] = $this->PD_Model->updateRecords($to_update, PDDOCUMENTS, $where_condition_array);
|
||||
$res['msg'] = "Updated";
|
||||
$data['uri'] = null;
|
||||
}else if($records['pd_document_id'] == "") {
|
||||
$res = $this->saveBase64Images($records);
|
||||
}
|
||||
if (!empty($res)) {
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['uri'] = $res['records'];
|
||||
$data['msg'] = $res['msg'];
|
||||
$this->response($data, REST_Controller::HTTP_OK, true);
|
||||
} else {
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Something Went Wrong!';
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
public function saveBase64Images($data)
|
||||
{
|
||||
$pd_id = $data['pd_id'];
|
||||
$form_id = $data['formid'];
|
||||
log_message('ERROR', '###FI-PDIMAGE saveBase64Images function called' . $pd_id . ' - ' . $form_id);
|
||||
$count = 0;
|
||||
$result = array();
|
||||
$pks = array();
|
||||
$uri = null;
|
||||
$pd_details = $this->PD_Model->getPDMasterDetails($pd_id);
|
||||
//print_r($data);die();
|
||||
EXTERNAL_DIR_CHECK::checkExternalDirectory($pd_id);
|
||||
$this->location_for_watermark = $data['location'];
|
||||
$temp_base64_string = $data['image'];
|
||||
$is_show_report = isset($data['is_show_report']) ? $data['is_show_report'] : null;
|
||||
|
||||
$output_file = $this->external_path . "/pd_reports/" . $pd_id . "/temp_base64_image.jpeg";
|
||||
$this->temp_path_for_watermark = $output_file;
|
||||
|
||||
//Generate Random File Name
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
$temp_file_name = $randomString . date('Y-m-d-H-i-s') . '.jpeg';
|
||||
|
||||
log_message('ERROR', '###FI-PDIMAGE writing started' . $pd_id . ' - ' . $form_id);
|
||||
$ifp = fopen($output_file, 'wb');
|
||||
$temp_data = explode(',', $temp_base64_string);
|
||||
fwrite($ifp, base64_decode($temp_data[1]));
|
||||
fclose($ifp);
|
||||
log_message('ERROR', '###FI-PDIMAGE writing done' . $pd_id . ' - ' . $form_id);
|
||||
|
||||
log_message('ERROR', '###FI-PDIMAGE uploading to S3' . $pd_id . ' - ' . $form_id);
|
||||
$tempdoc = $output_file;
|
||||
$tempdocname = $temp_file_name;
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX . $pd_details[0]['fk_lender_id'];
|
||||
$key = 'pd' . $pd_id . '/' . $tempdocname;
|
||||
$sourcefile = $tempdoc;
|
||||
|
||||
$bucket_data = array('bucket_name' => $bucketname, 'key' => $key, 'sourcefile' => $sourcefile);
|
||||
|
||||
//this line make this bucket data values in obj level so can access in helpers and hook files
|
||||
$this->bucket_data_for_watermark = $bucket_data;
|
||||
$s3result = $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
|
||||
if (is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) {
|
||||
log_message('ERROR', '###FI-PDIMAGE stored in S3' . $pd_id . ' - ' . $form_id);
|
||||
$record_data = array('fk_pd_id' => $pd_id, 'pd_document_title' => (isset($data['pd_document_title']) ? $data['pd_document_title'] : null), 'pd_document_name' => $tempdocname, 'fk_form_id' => $form_id, 'is_show_report' => $is_show_report, 'location' => isset($data['location']) ? $data['location'] : null, 'img_type' => (isset($data['img_type']) ? $data['img_type'] : null), 'image_key' => (isset($data['image_key']) ? $data['image_key'] : null), "pd_image_alias_name" => (isset($data['pd_image_alias_name']) ? $data['pd_image_alias_name'] : null));
|
||||
$id = $this->PD_Model->saveRecords($record_data, PDDOCUMENTS);
|
||||
$uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname, $key, $time = '+1 week');
|
||||
$this->img_url_for_watermark = $uri;
|
||||
}
|
||||
|
||||
|
||||
if ($id) {
|
||||
log_message('ERROR', '###FI-PDIMAGE Saved Sucessfully ID '.$id);
|
||||
//$logger->info('All Images Saved Sucessfully',array($pd_id,$form_id,$company_id));
|
||||
$result['status'] = true;
|
||||
$result['id'] = $id;
|
||||
$result['records'] = $uri;
|
||||
$result['msg'] = "Images Saved Successfully";
|
||||
} else {
|
||||
//$logger->info('Some Images Not Saved',array($pd_id,$form_id,$company_id));
|
||||
$result['status'] = true;
|
||||
$result['msg'] = "Images Not Saved!";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
public function FIPDPhotograph_get(){
|
||||
|
||||
$pd_id = $this->get('pd_id');
|
||||
$form_id = "34"; // FI photograph HardCoded.
|
||||
if(!empty($pd_id)){
|
||||
$fields = array('json');
|
||||
$where_condition_array = array("fk_form_id"=>$form_id,"fk_pd_id"=>$pd_id,'isactive'=>1);
|
||||
$form_table = $this->Template_Management_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||
// print_r($form_table);
|
||||
// $file = $this->external_path . '/pd_reports/tmp/1.txt'; // testing purpose;
|
||||
if(count($form_table)>0){
|
||||
// if(1){
|
||||
$json = json_decode($form_table[0]['json'],true);
|
||||
$json = $json['photograph_details'];
|
||||
// $json = $this->getArr(); // testing purpose;
|
||||
// print_r($json);die(); // testing purpose;
|
||||
$pd_master = $this->PD_Model->selectCustomRecords(array('pd_id', 'random_string','fk_lender_id'), array('pd_id' => $pd_id ), PDTRIGGER);
|
||||
$pd_docs = $this->PD_Model->selectCustomRecords(array('pd_document_id', 'fk_pd_id', 'fk_pd_detail_id', 'fk_form_id', 'co_applicant_id', 'img_type', 'image_key', 'pd_document_title', 'pd_document_name', 'pd_image_alias_name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'company_id', 'is_show_report', 'is_name_editable', 'rental_count_id', 'location', 'isactive', 'retake_flag'), array('fk_pd_id' => $pd_id, 'fk_form_id' =>$form_id, 'pd_document_title != ""' =>null), PDDOCUMENTS);
|
||||
|
||||
if(count($pd_docs)>0){
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX . $pd_master[0]['fk_lender_id'];
|
||||
// $imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted'),'name_board_seen' => array('is_multiple' => 1,'img_name' => 'Business Name Board'),'stock_image' => array('is_multiple' => 1,'img_name' => 'Stock Images'),'workplace_interior_image' => array('is_multiple' => 1,'img_name' => 'Work Place Interior'));
|
||||
foreach ($pd_docs as $key => $value) {
|
||||
$picspath = 'pd' . $pd_master[0]['pd_id'] . '/' . $value['pd_document_name'];
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name, $picspath, '+5 minutes');
|
||||
$pd_docs[$key]['doc_url'] = $singed_uri;
|
||||
|
||||
}
|
||||
// print_r($pd_docs);die(); // wroking fine
|
||||
for($i=0; $i<count($json); $i++){
|
||||
if(isset($json[$i]['is_multiple']) && $json[$i]['is_multiple'] == 0 && $json[$i]['answer_value'] == "saved"){
|
||||
for($j=0; $j<count($pd_docs); $j++){
|
||||
if($pd_docs[$j]['image_key'] == $json[$i]['question_key']){
|
||||
$json[$i]['answer_value'] = $pd_docs[$j]['doc_url'];
|
||||
$json[$i]['pd_document_id'] = $pd_docs[$j]['pd_document_id'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if(isset($json[$i]['questions_group'])){
|
||||
$second_arr = $json[$i]['questions_group'];
|
||||
for($k=0; $k<count($second_arr); $k++){
|
||||
$thrid_arr = $second_arr[$k]['questions'];
|
||||
for($l=0; $l<count($thrid_arr); $l++){
|
||||
if(isset($thrid_arr[$l]['is_multiple']) && $thrid_arr[$l]['is_multiple'] == 0 && $thrid_arr[$l]['answer_value'] == "saved"){
|
||||
for($j=0; $j<count($pd_docs); $j++){
|
||||
$question = $thrid_arr[$l]['question'].' '.($k+1);
|
||||
// echo "\n";
|
||||
if($pd_docs[$j]['image_key'] == $thrid_arr[$l]['question_key'] && $pd_docs[$j]['pd_document_title'] == $question){
|
||||
// $thrid_arr[$l]['answer_value'] = $pd_docs[$j]['doc_url'];
|
||||
$json[$i]['questions_group'][$k]['questions'][$l]['answer_value'] = $pd_docs[$j]['doc_url'];
|
||||
$json[$i]['questions_group'][$k]['questions'][$l]['pd_document_id'] = $pd_docs[$j]['pd_document_id'];
|
||||
}
|
||||
}
|
||||
// print_r($thrid_arr[$l]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// echo "inxx".$i;
|
||||
}
|
||||
}
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $json;
|
||||
}else{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'FI-Document Not Available for Given PD ID ! ';
|
||||
}
|
||||
}else{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'FI-Photograph JSON Not Available for Given PD ID ! ';
|
||||
}
|
||||
}else{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'PD ID Not available ! ';
|
||||
}
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
@ -84,6 +84,7 @@ class Test extends REST_Controller {
|
||||
$pdid = $this->post('pdid');
|
||||
$src = $this->post('src');
|
||||
$dest = $this->post('dest');
|
||||
$coapplicant = $this->post('applicant_id');
|
||||
$src_url_type = $this->post('src_url_type');
|
||||
$dest_url_type = $this->post('dest_url_type');
|
||||
$res_data = array('nxt_action' => null);
|
||||
@ -134,9 +135,8 @@ class Test extends REST_Controller {
|
||||
// echo '***********************';
|
||||
}
|
||||
}
|
||||
//update face api result in main table
|
||||
$where_condition_array = array('pd_id' => $pdid);
|
||||
$this->PD_Model->updateRecords(['faceapi_result' => json_encode($res_data)],PDTRIGGER,$where_condition_array);
|
||||
$where_condition_array = array('fk_pd_id' => $pdid,'isactive' => 1,'pd_co_applicant_id' => $coapplicant);
|
||||
$this->PD_Model->updateRecords(['faceapi_result' => json_encode($res_data)],PDAPPLICANTSDETAILS,$where_condition_array);
|
||||
|
||||
//delete local files if created
|
||||
if($dest_url_type == 'base64')
|
||||
|
||||
@ -72,7 +72,7 @@ class AUTHORIZATION
|
||||
}
|
||||
|
||||
|
||||
if( $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B || $routingName == ROUTE_LOGIN_C)
|
||||
if( $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B || $routingName == ROUTE_LOGIN_C || $routingName == ROUTE_LOGIN_D || $routingName == ROUTE_LOGIN_E || $routingName == ROUTE_LOGIN_F || $routingName == ROUTE_LOGIN_S)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -14,8 +14,12 @@ class CET_CREDITPD
|
||||
$key_check = array("Supplier details","Clients details","Stock details", "Neighbourhood Details", "Existing Loan Obligations","Business Assets");
|
||||
for($i=0;$i<count($key_check);$i++){
|
||||
if(array_key_exists($key_check[$i],$data)){
|
||||
if(array_key_exists('display_data', $data[$key_check[$i]]))
|
||||
unset($data[$key_check[$i]]['display_data']); }
|
||||
// echo $key_check[$i];
|
||||
// echo gettype($key_check[$i])."\n";die();
|
||||
$key_name = $key_check[$i];
|
||||
if(is_array($data[$key_name]) && array_key_exists('display_data', $data[$key_name]))
|
||||
unset($data[$key_check[$i]]['display_data']);
|
||||
}
|
||||
}
|
||||
$fields['data'] = $data;
|
||||
$pdid = $fields['pdid'];
|
||||
|
||||
134
api/application/helpers/digital_locker_helper.php
Normal file
134
api/application/helpers/digital_locker_helper.php
Normal file
@ -0,0 +1,134 @@
|
||||
<?php
|
||||
|
||||
class DIGITAL_LOCKER
|
||||
{
|
||||
|
||||
static $TOKEN_AS_GLOBAl = null;
|
||||
static public $myVAR = null;
|
||||
|
||||
public static function getAccessToken($code,$applicant)
|
||||
{
|
||||
log_message('ERROR',"### 2 Msg : Inside Digi Helper getAccessToken Fns");
|
||||
log_message('ERROR',"### 2 Params : i have code :".$code." & applicant :".$applicant);
|
||||
$CI =&get_instance();
|
||||
$headers = array('Content-Type: multipart/form-data');
|
||||
// $headers = array('Content-Type: application/json');
|
||||
$ch = curl_init();
|
||||
$fields = array('code' => $code,'grant_type' =>'authorization_code','client_secret' =>'bbda9efeb26bff460434','client_id' =>'FE9E5D06','redirect_uri' => 'https://apitest.pdgenie.com/sparqtest/api/getDigiLockerDocs');
|
||||
curl_setopt( $ch,CURLOPT_URL, DIGILOCKER_TOKEN_URI);
|
||||
curl_setopt( $ch,CURLOPT_POST, true );
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
|
||||
$result=curl_exec($ch);
|
||||
$response = json_decode($result);
|
||||
curl_close( $ch );
|
||||
log_message('ERROR',"### 2 Response :".json_encode($response));
|
||||
if(isset($response->error_description)){
|
||||
log_message('ERROR',"### 2 Error :".$response->error_description);
|
||||
return array('dataStatus'=>false,'msg'=>$response->error_description);
|
||||
}else{
|
||||
log_message('ERROR',"### 3 Token :".$response->access_token);
|
||||
$CI->db->SELECT("PDAPPLICANTSDETAILS.fk_pd_id,PDAPPLICANTSDETAILS.pd_co_applicant_id,PDAPPLICANTSDETAILS.applicant_name,
|
||||
PDTRIGGER.lender_applicant_id, PDTRIGGER.pd_sno");
|
||||
$CI->db->FROM(PDAPPLICANTSDETAILS." as PDAPPLICANTSDETAILS");
|
||||
$CI->db->JOIN(PDTRIGGER .' as PDTRIGGER','PDAPPLICANTSDETAILS.fk_pd_id = PDTRIGGER.pd_id','LEFT');
|
||||
$CI->db->WHERE("PDAPPLICANTSDETAILS.pd_co_applicant_id",$applicant);
|
||||
$CI->db->WHERE("PDAPPLICANTSDETAILS.isactive",1);
|
||||
$dtls = $CI->db->GET()->result_array();
|
||||
// 9 840-2 714
|
||||
$CI->db->where('pd_co_applicant_id',$applicant);
|
||||
$CI->db->update(PDAPPLICANTSDETAILS, array('digi_locker_token' => $result));
|
||||
// print_r($CI->db->last_query());die();
|
||||
log_message('ERROR',"### 3 SQL Reponse :".json_encode($dtls));
|
||||
return self::getFileIssuedList($response->access_token,$dtls);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getFileIssuedList($access_token,$dtls)
|
||||
{
|
||||
log_message('ERROR',"### 4 Msg : Inside Helper getFileIssuedList");
|
||||
log_message('ERROR',"### 4 Token :".$access_token);
|
||||
$CI =&get_instance();
|
||||
$headers = array('Authorization: Bearer '.$access_token);
|
||||
$ch = curl_init();
|
||||
curl_setopt( $ch,CURLOPT_URL, DIGILOCKER_FILESLIST_URI);
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
$result=curl_exec($ch);
|
||||
log_message('ERROR',"### 4 Reponse :".json_encode($result));
|
||||
curl_close( $ch );
|
||||
return array('dataStatus'=>true,'records'=>$result,'token'=>$access_token,'dtls'=>$dtls);
|
||||
}
|
||||
|
||||
// public static function downloadFiles($uri,$access_token)
|
||||
// {
|
||||
// log_message('ERROR',"### 6 : Inside Helper DIGILOCKERGETFILEURI Token :".$access_token." & URI :".$uri);
|
||||
// log_message('ERROR',"### 6.1 : Dummy API ");
|
||||
// $image_url = "http://p.twimg.com/AW2-vIUCAAE_1FN.png";
|
||||
|
||||
// $ch = curl_init();
|
||||
// curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
// curl_setopt ($ch, CURLOPT_URL, $image_url);
|
||||
// curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
// curl_setopt ($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
|
||||
// curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
// curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
// curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
|
||||
// $content = curl_exec ($ch);
|
||||
// log_message('ERROR',"### 6th : DIGILOCKERGETFILEURI Reponse :".json_encode($content));
|
||||
// $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
|
||||
// echo $contentType;
|
||||
// echo "<br/>";
|
||||
// curl_close ($ch);
|
||||
// echo "<pre>";
|
||||
// print_r($content);
|
||||
// }
|
||||
public static function downloadFiles($uri,$access_token)
|
||||
{
|
||||
log_message('ERROR',"### 7 MSG : Inside Helper DIGILOCKERGETFILEURI");
|
||||
log_message('ERROR',"### 7 Token :".$access_token." & URI :".$uri);
|
||||
$CI =&get_instance();
|
||||
$headers = array('Authorization: Bearer '.$access_token);
|
||||
$ch = curl_init();
|
||||
curl_setopt( $ch,CURLOPT_URL, DIGILOCKER_GETFILE_URI.$uri);
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
$result=curl_exec($ch);
|
||||
log_message('ERROR',"### 7 Reponse :".json_encode($result));
|
||||
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
|
||||
log_message('ERROR',"### 7 ContentType :".$contentType);
|
||||
curl_close ($ch);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
public static function userCh_check1(){
|
||||
global $myVAR;
|
||||
self::userCh_check2();
|
||||
return $var;
|
||||
}
|
||||
public static function userCh_check2(){
|
||||
global $myVAR;
|
||||
$myVAR = 7123;
|
||||
}
|
||||
public static function userCh_check3($code,$applicant){
|
||||
$CI =&get_instance();
|
||||
$CI->db->SELECT("fk_pd_id,pd_co_applicant_id,applicant_name");
|
||||
$CI->db->FROM(PDAPPLICANTSDETAILS." as PDAPPLICANTSDETAILS");
|
||||
$CI->db->WHERE("PDAPPLICANTSDETAILS.pd_co_applicant_id",$applicant);
|
||||
$CI->db->WHERE("PDAPPLICANTSDETAILS.isactive",1);
|
||||
$dtls = $CI->db->GET()->result_array();
|
||||
$pd_id = (count($dtls)>0) ? $dtls[0]['fk_pd_id'] : null;
|
||||
$response = "bb";
|
||||
$CI->db->where('pd_co_applicant_id',$applicant);
|
||||
$CI->db->update(PDAPPLICANTSDETAILS, array('digi_locker_token' => $response));
|
||||
|
||||
}
|
||||
public static function callTheFiles($src_local_file){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -2,123 +2,187 @@
|
||||
|
||||
class faceapi
|
||||
{
|
||||
public static function toMakeFaceBoundingBox($image_name,$BoundingBox,$destination_path){
|
||||
log_message('ERROR',"In faceapi helper @ line no : 6 to Make FaceBoundingBox");
|
||||
$get_image_format = explode(".",$image_name);
|
||||
$image_format = $get_image_format[1];
|
||||
log_message('ERROR','In faceapi helper @ line no : 9 to Make FaceBoundingBox image_format :'.$image_format);
|
||||
// print_r($get_image_format);die();
|
||||
$img = imagecreatefrompng($destination_path);
|
||||
// if($image_format == 'png'){
|
||||
// $img = imagecreatefrompng($destination_path);
|
||||
// }else if($image_format == 'jpeg'){
|
||||
// $img = imagecreatefromjpeg($destination_path);
|
||||
// }else if($image_format == 'jpg'){
|
||||
// $img = imagecreatefromjpg($destination_path);
|
||||
// }
|
||||
|
||||
$red = imagecolorallocate($img, 255, 0, 0);
|
||||
$black = imagecolorallocate($img, 0, 0, 0);
|
||||
$white = imagecolorallocate($img, 255, 255, 255);
|
||||
|
||||
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
||||
log_message('ERROR','In faceapi helper @ line no : 25 to Make FaceBoundingBox image_width'.$imagewidth.'image_height'.$imageheight);
|
||||
for($i=0;$i<count($BoundingBox);$i++){
|
||||
|
||||
$Left_coordinate = ($BoundingBox[$i]['Left'] * $imagewidth) ;
|
||||
$Top_coordinate = ($BoundingBox[$i]['Top'] * $imageheight) ;
|
||||
$Face_width = ($BoundingBox[$i]['Width'] * $imagewidth) ;
|
||||
$Face_height = ($BoundingBox[$i]['Height'] * $imageheight) ;
|
||||
$Similarity = $BoundingBox[$i]['Similarity'];
|
||||
public static function toMakeFaceBoundingBox($bounding_box, $path, $file_name, $key,$apcntid)
|
||||
{
|
||||
// ($image_name,$BoundingBox,$destination_path,$extension){
|
||||
|
||||
$x1 = $Left_coordinate;
|
||||
$y1 = $Top_coordinate;
|
||||
|
||||
self::DrawLine($x1,$y1,$Face_width,$Face_height,$Similarity,$img,$destination_path);
|
||||
|
||||
log_message('ERROR', "In faceapi helper @6 to Make FaceBoundingBox", $path, $file_name);
|
||||
$file_path = $path . $file_name;
|
||||
// $red = imagecolorallocate($img, 255, 0, 0);
|
||||
// $black = imagecolorallocate($img, 0, 0, 0);
|
||||
// $white = imagecolorallocate($img, 255, 255, 255);
|
||||
|
||||
list($imagewidth, $imageheight) = getimagesize($file_path);
|
||||
log_message('ERROR', 'In faceapi helper @25 to Make FaceBoundingBox image_width' . $imagewidth . 'image_height' . $imageheight);
|
||||
|
||||
if (count($bounding_box) > 0) {
|
||||
$response = array();
|
||||
$CmpBoundingBox = $bounding_box['compare_image'];
|
||||
$file_path = $path . $file_name;
|
||||
$info = getimagesize($file_path);
|
||||
$extension = image_type_to_extension($info[2]);
|
||||
$SrcBoundingBox = $bounding_box['source_image'];
|
||||
if (count($CmpBoundingBox) > 0 && ($key == 'selfie_with_person_met')) {
|
||||
$destination_path = $path . 'face_api_image_'.$apcntid . $extension;
|
||||
if (!copy($file_path, $destination_path)) {
|
||||
log_message('ERROR', 'failed to copy');
|
||||
}
|
||||
$img = imagecreatefrompng($destination_path);
|
||||
|
||||
for ($i = 0; $i < count($CmpBoundingBox); $i++) {
|
||||
|
||||
$Left_coordinate = ($CmpBoundingBox[$i]['Left'] * $imagewidth);
|
||||
$Top_coordinate = ($CmpBoundingBox[$i]['Top'] * $imageheight);
|
||||
$Face_width = ($CmpBoundingBox[$i]['Width'] * $imagewidth);
|
||||
$Face_height = ($CmpBoundingBox[$i]['Height'] * $imageheight);
|
||||
$Similarity = $CmpBoundingBox[$i]['Similarity'];
|
||||
|
||||
$x1 = $Left_coordinate;
|
||||
$y1 = $Top_coordinate;
|
||||
|
||||
$data = self::imgCrop($x1, $y1, $Face_width, $Face_height, $Similarity, $img, $destination_path, $i,$apcntid);
|
||||
self::DrawLine($x1, $y1, $Face_width, $Face_height, $Similarity, $img, $destination_path,$apcntid);
|
||||
array_push($response,$data);
|
||||
|
||||
}
|
||||
$d['compare_image'] = $response;
|
||||
return $d;
|
||||
} else {
|
||||
$destination_path = $path . 'src_image_'.$apcntid . $extension;
|
||||
if (!copy($file_path, $destination_path)) {
|
||||
log_message('ERROR', 'failed to copy');
|
||||
}
|
||||
$img = imagecreatefrompng($destination_path);
|
||||
|
||||
$Left_coordinate = ($SrcBoundingBox['Left'] * $imagewidth);
|
||||
$Top_coordinate = ($SrcBoundingBox['Top'] * $imageheight);
|
||||
$Face_width = ($SrcBoundingBox['Width'] * $imagewidth);
|
||||
$Face_height = ($SrcBoundingBox['Height'] * $imageheight);
|
||||
$Similarity = 0;
|
||||
|
||||
$x1 = $Left_coordinate;
|
||||
$y1 = $Top_coordinate;
|
||||
$i = null;
|
||||
// self::imgCrop($x1,$y1,$Face_width,$Face_height,$path,$file_name,$i);
|
||||
$data = self::imgCrop($x1, $y1, $Face_width, $Face_height, $Similarity, $img, $destination_path, $i,$apcntid);
|
||||
unlink($destination_path);
|
||||
$response['source_image'] = $data;
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function DrawLine($x1,$y1,$Face_width,$Face_height,$Similarity,$img,$destination_path){
|
||||
log_message('ERROR','In faceapi helper @ line no : 45 Draw Line x1 : '.$x1.' y1 : '.$y1.' Face_width : '.$Face_width.' Face_height : '.$Face_height.' Similarity : '.$Similarity.' img : '.$img.' destination_path : '.$destination_path);
|
||||
$Similarity_split = explode(".",$Similarity);
|
||||
public static function DrawLine($x1, $y1, $Face_width, $Face_height, $Similarity, $img, $destination_path)
|
||||
{
|
||||
// log_message('ERROR', 'In faceapi helper @45 Draw Line x1 : ' . $x1 . ' y1 : ' . $y1 . ' Face_width : ' . $Face_width . ' Face_height : ' . $Face_height . ' Similarity : ' . $Similarity . ' img : ' . $img . ' destination_path : ' . $destination_path);
|
||||
$Similarity_split = explode(".", $Similarity);
|
||||
$Similarity_value = $Similarity_split[0];
|
||||
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
||||
if($Similarity_value >= 70 ){// above 70 green
|
||||
if ($Similarity_value > 80) { // above 81 green
|
||||
$color = imagecolorallocate($img, 0, 153, 0);
|
||||
}else if($Similarity_value < 70 ){// below 70 red
|
||||
} else if ($Similarity_value <= 80 && $Similarity_value > 60) { // in between 61 to 80 orange
|
||||
$color = imagecolorallocate($img, 255, 165, 0);
|
||||
} else if ($Similarity_value <= 60) { // below 60 red
|
||||
$color = imagecolorallocate($img, 255, 0, 0);
|
||||
}
|
||||
$white = imagecolorallocate($img, 255, 255, 255);
|
||||
log_message('ERROR','In faceapi helper @ line no : 45 Draw Line color : '.$color);
|
||||
$Similarity = $Similarity_value." %";
|
||||
// log_message('ERROR', 'In faceapi helper @45 Draw Line color : ' . $color);
|
||||
$Similarity = $Similarity_value . " %";
|
||||
//TOP LINe
|
||||
$t_x1 = $x1;
|
||||
$t_y1 = $y1;
|
||||
$t_x2 = ($x1+$Face_width);
|
||||
$t_x2 = ($x1 + $Face_width);
|
||||
$t_y2 = $y1;
|
||||
|
||||
|
||||
//bottom line
|
||||
$b_x1 = $x1;
|
||||
$b_y1 = ($y1+$Face_height);
|
||||
$b_x2 = ($x1+$Face_width);
|
||||
$b_y2 = ($y1+$Face_height);
|
||||
$b_y1 = ($y1 + $Face_height);
|
||||
$b_x2 = ($x1 + $Face_width);
|
||||
$b_y2 = ($y1 + $Face_height);
|
||||
|
||||
$imgl = self::imagelinethick($img,$t_x1,$t_y1,$t_x2,$t_y2,$color,7);//top line
|
||||
$imgl = self::imagelinethick($img,$b_x1,$b_y1,$b_x2,$b_y2,$color,7);//bottom line
|
||||
$imgl = self::imagelinethick($img,$t_x1,$t_y1,$b_x1,$b_y1,$color,7);//left line
|
||||
$imgl = self::imagelinethick($img,$t_x2,$t_y2,$b_x2,$b_y2,$color,7);//right line
|
||||
$imgl = self::imagelinethick($img, $t_x1, $t_y1, $t_x2, $t_y2, $color, 7); //top line
|
||||
$imgl = self::imagelinethick($img, $b_x1, $b_y1, $b_x2, $b_y2, $color, 7); //bottom line
|
||||
$imgl = self::imagelinethick($img, $t_x1, $t_y1, $b_x1, $b_y1, $color, 7); //left line
|
||||
$imgl = self::imagelinethick($img, $t_x2, $t_y2, $b_x2, $b_y2, $color, 7); //right line
|
||||
// apppath / doc la roboto.tff
|
||||
$font = APPPATH."docs/roboto.ttf";
|
||||
// imagettftext($img, 20, 0, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
|
||||
$font = APPPATH . "docs/roboto.ttf";
|
||||
// imagettftext($img, 20, 0, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
|
||||
// imagepng($img, $destination_path);
|
||||
// imagepng($img, "face4.png");
|
||||
// imagefilledrectangle($img, $t_x1-5, $t_y1-18, $t_x1+28, $t_y1, $white);
|
||||
// imagefilledrectangle($img, $t_x1-5, $t_y1-18, $t_x1+28, $t_y1, $white);
|
||||
// imagettftext($img, 10, 10, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
|
||||
imagefilledrectangle($img, $t_x1-5, $t_y1-30, $t_x1+60, $t_y1, $white);
|
||||
imagettftext($img, 17, 8, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
|
||||
|
||||
$get_image_format = explode(".",$destination_path);
|
||||
imagefilledrectangle($img, $t_x1 - 5, $t_y1 - 30, $t_x1 + 60, $t_y1, $white);
|
||||
imagettftext($img, 17, 8, ($t_x1), ($t_y1 - 5), $color, $font, $Similarity);
|
||||
|
||||
$get_image_format = explode(".", $destination_path);
|
||||
$image_format = $get_image_format[1];
|
||||
|
||||
if($image_format == 'png'){
|
||||
imagepng($img, $destination_path);
|
||||
}else if($image_format == 'jpeg'){
|
||||
imagejpeg($img, $destination_path);
|
||||
}else if($image_format == 'jpg'){
|
||||
if ($image_format == 'png') {
|
||||
imagepng($img, $destination_path);
|
||||
} else if ($image_format == 'jpeg') {
|
||||
imagejpeg($img, $destination_path);
|
||||
} else if ($image_format == 'jpg') {
|
||||
// $destination_path = $get_image_format[0].".jpeg";
|
||||
imagejpg($img, $destination_path);
|
||||
imagejpg($img, $destination_path);
|
||||
}
|
||||
|
||||
// $image_data = file_get_contents($destination_path);
|
||||
// $base64 = base64_encode($image_data);
|
||||
// return array('name' => $temp_image_name, 'base64' => $base64, 'Similarity' => $Similarity);
|
||||
}
|
||||
|
||||
public static function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)
|
||||
{
|
||||
/* this way it works well only for orthogonal lines
|
||||
{
|
||||
/* this way it works well only for orthogonal lines
|
||||
imagesetthickness($image, $thick);
|
||||
return imageline($image, $x1, $y1, $x2, $y2, $color);
|
||||
*/
|
||||
if ($thick == 1) {
|
||||
return imageline($image, $x1, $y1, $x2, $y2, $color);
|
||||
}
|
||||
$t = $thick / 2 - 0.5;
|
||||
if ($x1 == $x2 || $y1 == $y2) {
|
||||
return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);
|
||||
}
|
||||
$k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q
|
||||
$a = $t / sqrt(1 + pow($k, 2));
|
||||
$points = array(
|
||||
round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),
|
||||
round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),
|
||||
round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),
|
||||
round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),
|
||||
);
|
||||
imagefilledpolygon($image, $points, 4, $color);
|
||||
return imagepolygon($image, $points, 4, $color);
|
||||
}
|
||||
|
||||
if ($thick == 1) {
|
||||
return imageline($image, $x1, $y1, $x2, $y2, $color);
|
||||
}
|
||||
$t = $thick / 2 - 0.5;
|
||||
if ($x1 == $x2 || $y1 == $y2) {
|
||||
return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);
|
||||
}
|
||||
$k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q
|
||||
$a = $t / sqrt(1 + pow($k, 2));
|
||||
$points = array(
|
||||
round($x1 - (1 + $k) * $a), round($y1 + (1 - $k) * $a),
|
||||
round($x1 - (1 - $k) * $a), round($y1 - (1 + $k) * $a),
|
||||
round($x2 + (1 + $k) * $a), round($y2 - (1 - $k) * $a),
|
||||
round($x2 + (1 - $k) * $a), round($y2 + (1 + $k) * $a),
|
||||
);
|
||||
imagefilledpolygon($image, $points, 4, $color);
|
||||
return imagepolygon($image, $points, 4, $color);
|
||||
}
|
||||
|
||||
public static function imgCrop($x1, $y1, $Face_width, $Face_height, $Similarity, $img, $destination_path, $i,$apcntid)
|
||||
{
|
||||
$temp_image_name = $i === null ? "id_proof_crop_".$apcntid.".png" : "face_crop_".$apcntid."_" . $i . ".png";
|
||||
// log_message('ERROR', 'In faceapi helper - imgCrop @126 x1 : ' . $x1 . ' y1 : ' . $y1 . ' Face_width : ' . $Face_width . ' Face_height : ' . $Face_height . ' Similarity : ' . $Similarity . ' img : ' . $img . ' destination_path : ' . $destination_path);
|
||||
$destination_path_2 = preg_replace('#/\w+(\.\w+)$#', '/' . $temp_image_name, $destination_path);
|
||||
log_message('ERROR', 'In faceapi helper - imgCrop @126 destination_path b4 : ' . $destination_path . ' destination_path after : ' . $destination_path_2);
|
||||
$to_crop_array = array('x' => $x1, 'y' => $y1, 'width' => $Face_width, 'height' => $Face_height);
|
||||
$dest = imagecrop($img, $to_crop_array);
|
||||
$get_image_format = explode(".", $destination_path);
|
||||
$image_format = $get_image_format[1];
|
||||
if ($image_format == 'png') {
|
||||
imagepng($dest, $destination_path_2);
|
||||
} else if ($image_format == 'jpeg') {
|
||||
imagejpeg($dest, $destination_path_2);
|
||||
} else if ($image_format == 'jpg') {
|
||||
imagejpg($dest, $destination_path_2);
|
||||
}
|
||||
$image_data = file_get_contents($destination_path_2);
|
||||
$base64 = base64_encode($image_data);
|
||||
unlink($destination_path_2);
|
||||
$Similarity_split = explode(".", $Similarity);
|
||||
$Similarity_value = $Similarity_split[0];
|
||||
// if($i === null){
|
||||
return array('name' => $temp_image_name, 'base64' => $base64, 'Similarity' => $Similarity_value);
|
||||
// }else{
|
||||
// return array($i => array('name' => $temp_image_name, 'base64' => $base64, 'Similarity' => $Similarity));
|
||||
// }
|
||||
// return array('name' => $temp_image_name, 'base64' => $base64, 'Similarity' => $Similarity);
|
||||
// unlink($destination_path);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -2501,7 +2501,8 @@ class GETPROCESSEDJSON
|
||||
public static function convertFinalRemarksForm($raw_json,$formid)
|
||||
{
|
||||
|
||||
//echo "FEPJ called";
|
||||
// echo "FEPJ called";
|
||||
// print_r($raw_json);die;
|
||||
$CI =& get_instance();
|
||||
$master_tables_field_names = $CI->config->item('master_tables_field_names');
|
||||
$master_tables_pkid = $CI->config->item('master_tables_pkid');
|
||||
@ -2713,7 +2714,247 @@ class GETPROCESSEDJSON
|
||||
}
|
||||
/************************########### END OF EMPLOYMENT FORM #################****************************/
|
||||
|
||||
/*****************########## START FI-GENERAL FORM DETAILS ##########**************/
|
||||
public static function convertFIGeneralDetailsForm($raw_json,$formid)
|
||||
{
|
||||
|
||||
|
||||
$CI =& get_instance();
|
||||
if(!empty($raw_json))
|
||||
{
|
||||
foreach ($raw_json as $key => $value){
|
||||
if(isset($value['Designation_of_Person_met']) && $value['Designation_of_Person_met'] != "")
|
||||
{
|
||||
$cr = $CI->PD_Model->selectCustomRecords(array('*'),array('company_relationship_id' =>$value['Designation_of_Person_met'] ),COMPANYRELATIONSHIPS);
|
||||
if($cr)
|
||||
{
|
||||
$raw_json[$key]['designation_person_met_master'] = $cr[0]['name'];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($value['Name_of_the_Person_met']) && $value['Name_of_the_Person_met'] != "")
|
||||
{
|
||||
$CI->db->SELECT('applicant_name');
|
||||
$CI->db->FROM(PDAPPLICANTSDETAILS);
|
||||
//$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE( 'pd_co_applicant_id' ,$value['Name_of_the_Person_met']);
|
||||
$name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
//print_r($name);
|
||||
if(count($name))
|
||||
{
|
||||
$raw_json[$key]['Name_of_the_Person_met_master'] = $name[0]['applicant_name'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return $raw_json;
|
||||
//print_r($raw_json);
|
||||
}
|
||||
/*****************########## END FI-GENERAL FORM DETAILS ##########**************/
|
||||
|
||||
/*****************########## FI-ADDRESS FORM DETAILS ##########********************/
|
||||
|
||||
public static function convertFIAddressForm($raw_json,$formid)
|
||||
{
|
||||
// echo "ADDRESS FORM CALLED";
|
||||
$CI =& get_instance();
|
||||
$master_tables_field_names = $CI->config->item('master_tables_field_names');
|
||||
$master_tables_pkid = $CI->config->item('master_tables_pkid');
|
||||
|
||||
$fields = array('question', 'key', 'ismaster', 'master_name');
|
||||
$where_condition_array = array('fk_form_id' => $formid,'isactive' => 1);
|
||||
$master_keys = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,QUESTIONKEYMAPPING);
|
||||
|
||||
|
||||
foreach($raw_json as $raw_json_key => $address)
|
||||
{
|
||||
|
||||
if(isset($address['Address_Type']))
|
||||
{
|
||||
$CI->db->SELECT( $master_tables_field_names['ADDRESSTYPE'] );
|
||||
$CI->db->FROM(ADDRESSTYPE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['ADDRESSTYPE'] ,$address['Address_Type']);
|
||||
$adress_type_name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($adress_type_name))
|
||||
{
|
||||
$raw_json[$raw_json_key]['address_type_master'] = $adress_type_name[0][$master_tables_field_names['ADDRESSTYPE']];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if(array_key_exists('Locality',$address))
|
||||
if(isset($address['Locality']))
|
||||
{
|
||||
$CI->db->SELECT( $master_tables_field_names['LOCALITY'] );
|
||||
$CI->db->FROM(LOCALITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['LOCALITY'] ,$address['Locality']);
|
||||
$locality_name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($locality_name))
|
||||
{
|
||||
$raw_json[$raw_json_key]['locality_master'] = $locality_name[0][$master_tables_field_names['LOCALITY']];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if(array_key_exists('Approach_to_PD_location',$address))
|
||||
if(isset($address['Approach_to_PD_location']))
|
||||
{
|
||||
$CI->db->SELECT( $master_tables_field_names['PDLOCATIONAPPROACH'] );
|
||||
$CI->db->FROM(PDLOCATIONAPPROACH);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['PDLOCATIONAPPROACH'] ,$address['Approach_to_PD_location']);
|
||||
$pd_location_approach= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($pd_location_approach))
|
||||
{
|
||||
$raw_json[$raw_json_key]['pd_location_master'] = $pd_location_approach[0][$master_tables_field_names['PDLOCATIONAPPROACH']];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if(array_key_exists('Comment_on_Locality',$address))
|
||||
if(isset($address['Comment_on_Locality']))
|
||||
{
|
||||
$CI->db->SELECT( $master_tables_field_names['COMMENTSONLOCALITY'] );
|
||||
$CI->db->FROM(COMMENTSONLOCALITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['COMMENTSONLOCALITY'] ,$address['Comment_on_Locality']);
|
||||
$comments_on_locality= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($comments_on_locality))
|
||||
{
|
||||
$raw_json[$raw_json_key]['comment_locality_master'] = $comments_on_locality[0][$master_tables_field_names['COMMENTSONLOCALITY']];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if(array_key_exists('state',$address))
|
||||
if(isset($address['state']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['STATE'] );
|
||||
$CI->db->FROM(STATE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['STATE'] ,$address['state']);
|
||||
$adress_type_name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($adress_type_name))
|
||||
{
|
||||
$raw_json[$raw_json_key]['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
|
||||
}
|
||||
}
|
||||
|
||||
// if(array_key_exists('city',$address))
|
||||
if(isset($address['city']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['CITY'] );
|
||||
$CI->db->FROM(CITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['CITY'] ,$address['city']);
|
||||
$city= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($city))
|
||||
{
|
||||
$raw_json[$raw_json_key]['city_master'] = $city[0][$master_tables_field_names['CITY']];
|
||||
}
|
||||
}
|
||||
|
||||
// if(array_key_exists('pincode',$address))
|
||||
if(isset($address['pincode']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['PINCODE'] );
|
||||
$CI->db->FROM(PINCODE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['PINCODE'] ,$address['pincode']);
|
||||
$pincode= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($pincode))
|
||||
{
|
||||
$raw_json[$raw_json_key]['pincode_master'] = $pincode[0][$master_tables_field_names['PINCODE']];
|
||||
}
|
||||
}
|
||||
|
||||
// if(array_key_exists('Unit_of_Measurement',$address))
|
||||
if(isset($address['Unit_of_Measurement']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['UOM'] );
|
||||
$CI->db->FROM(UOM);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['UOM'] ,$address['Unit_of_Measurement']);
|
||||
$uom= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($uom))
|
||||
{
|
||||
$raw_json[$raw_json_key]['uom_master'] = $uom[0][$master_tables_field_names['UOM']];
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($raw_json['is_pd_done_on_initiated_address']) && (strtoupper($raw_json['is_pd_done_on_initiated_address']) == "NO") )
|
||||
{
|
||||
// if(array_key_exists('State_list',$address))
|
||||
if(isset($address['State_list']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['STATE'] );
|
||||
$CI->db->FROM(STATE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['STATE'] ,$address['State_list']);
|
||||
$adress_type_name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($adress_type_name))
|
||||
{
|
||||
$raw_json[$raw_json_key]['state2_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
|
||||
}
|
||||
}
|
||||
|
||||
// if(array_key_exists('city2',$address))
|
||||
if(isset($address['city2']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['CITY'] );
|
||||
$CI->db->FROM(CITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['CITY'] ,$address['city2']);
|
||||
$city= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($city))
|
||||
{
|
||||
$raw_json[$raw_json_key]['city2_master'] = $city[0][$master_tables_field_names['CITY']];
|
||||
}
|
||||
}
|
||||
|
||||
// if(array_key_exists('pincode2',$address))
|
||||
if(isset($address['pincode2']))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['PINCODE'] );
|
||||
$CI->db->FROM(PINCODE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['PINCODE'] ,$address['pincode2']);
|
||||
$pincode= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($pincode))
|
||||
{
|
||||
$raw_json[$raw_json_key]['pincode2_master'] = $pincode[0][$master_tables_field_names['PINCODE']];
|
||||
}
|
||||
}
|
||||
}
|
||||
return ($raw_json);
|
||||
}
|
||||
/*****************########## END OF FI-ADDRESS FORM DETAILS ##########**************/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -552,6 +552,7 @@ class PDALERTS
|
||||
$mail->addBCC("cpa@smcfinance.com");
|
||||
$mail->addBCC("neville@sinemanagement.com");
|
||||
$mail->addBCC("ssa@venbainfotech.com");
|
||||
$mail->addBCC("aakashjadhav@smcfinance.com");
|
||||
$mail->addAddress('cpumumbai@smcfinance.com');
|
||||
if(in_array((string)$city,$city_arg)){ $mail->addBCC("satendersingh@smcfinance.com");}
|
||||
// $mail->addBCC("vitvelz@gmail.com");
|
||||
@ -761,6 +762,7 @@ class PDALERTS
|
||||
$ref_str = "vendor email id";
|
||||
}
|
||||
if($flag == 1){ // Mail Content For - Agency ONLY
|
||||
|
||||
$mail_id = $core_details[0]['agency_mail'];
|
||||
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1(AGENCY) PD ID :'.$pd_id." and MAIL : ".$mail_id);
|
||||
$msg = "PD for Loan Application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']." have been allocated to you. ";
|
||||
@ -779,6 +781,7 @@ class PDALERTS
|
||||
$msg = self::stringReplace($msg,$core_details,'MAIL');
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name'];
|
||||
$ref_str = "";
|
||||
// $mail_id = "sanjeev.p@venbaingotech.com";
|
||||
// $mail->addBCC("sanjeev.p@venbainfotech.com");
|
||||
}
|
||||
|
||||
@ -855,6 +858,7 @@ class PDALERTS
|
||||
$mail->Subject = $subject;
|
||||
$mail->Body = 'Dear Team ,<br><br> '.$arg["msg"];
|
||||
$mail->AltBody = $arg["msg"];
|
||||
$mail->addBCC($arg["mail"]);
|
||||
|
||||
if(!$mail->send()) {
|
||||
// $logger->error("Mailer Error:" ,array($mail->ErrorInfo));
|
||||
|
||||
@ -43,6 +43,23 @@ class report_attachments
|
||||
return $attachment;
|
||||
|
||||
}
|
||||
|
||||
public function getSMCReportAttchments($pdid,$random_string,$pd_master_details = array())
|
||||
{
|
||||
$CI =&get_instance();
|
||||
|
||||
$CI->load->helper('url_shortener');
|
||||
|
||||
$uri = url_shortener::SMC_report_url_shorten($pdid,$random_string);
|
||||
|
||||
$attachment = '<div id="page_break">
|
||||
</div><h2>Data Links</h2>
|
||||
<p><a target="_blank" href="'.PDF_ATTACHEMENT_URL.$uri['ppdf'].'">Click here for Image PDF Link</a></p> <p> <a target="_blank" href="'.PDF_ATTACHEMENT_URL.$uri['zip'].'">Click here for Image ZIP Link</a> </p>';
|
||||
|
||||
$attachment.= '<br><br><br><p style="font-size:10px;text-align:center;">(Note all links will expire in 15 days from the date of report generation.)</p>';
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -583,6 +583,156 @@ class smc_creditpd
|
||||
// print_r($json);
|
||||
return $json;
|
||||
}
|
||||
public static function covertSMCImgs2ZIP($pdid,$random_string,$pd_master_details = array(),$regenerate = 0)
|
||||
{
|
||||
$CI =&get_instance();
|
||||
$CI->load->model('PD_Model');
|
||||
|
||||
if(!count($pd_master_details))
|
||||
{
|
||||
$pd_master_details = $CI->PD_Model->getPDMasterDetails($pdid,$random_string,$pd_master_details);
|
||||
}
|
||||
if(!file_exists($CI->external_path.'/pd_reports/'.$pdid))
|
||||
{
|
||||
mkdir($CI->external_path.'/pd_reports/'.$pdid,0777);
|
||||
}
|
||||
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||
$main_applicant_name = $pd_master_details[0]['main_applicant'];
|
||||
//get zip url from s3 if any
|
||||
|
||||
$key = 'pd'.$pdid.'/'.$main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
|
||||
|
||||
//$singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
if($pd_master_details[0]['is_zip_created'] && ($regenerate == 0))
|
||||
{
|
||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
|
||||
// $response_data['dataStatus'] = true;
|
||||
// $response_data['status'] = REST_Controller::HTTP_OK;
|
||||
// $response_data['records'] = $singed_uri;
|
||||
// $CI->response($response_data,REST_Controller::HTTP_OK); 9344876517
|
||||
} else
|
||||
{
|
||||
|
||||
$all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 ),SMC_CREDIT_PD_DOCS);
|
||||
if(count($all_pd_images)>0){
|
||||
// $all_form_names = array('pd_form_id'=>19,'pd_form_name'=>"photograph");
|
||||
// $form_name[19] = "photograph";
|
||||
|
||||
//Generate zip file
|
||||
|
||||
$CI->load->library('zip');
|
||||
|
||||
$CI->zip->add_dir('pdimages');
|
||||
|
||||
$is_this_multiple_image = array('property_images','supplier_image','stock_image','client_image','additional_photograph');
|
||||
$cl=1;$st=1;$su=1;$pr=1;$ad=1;//$first2character flag don't Deleted it.
|
||||
|
||||
foreach($all_pd_images as $image)
|
||||
{
|
||||
|
||||
$temp_dir_name = 'Common';
|
||||
$doc_name = str_replace(':', '-', $image['img_name']);
|
||||
$src_local_file = XLPATH.'/tmp/'.$doc_name.'.png';
|
||||
$ifp = fopen( $src_local_file, 'wb' );
|
||||
$img = explode( ',', $image['img'] );
|
||||
// fwrite( $ifp, base64_decode( $img[ 1 ] ) );
|
||||
if($doc_name == "satellite"){
|
||||
fwrite( $ifp, base64_decode($image['img']) );
|
||||
}else{
|
||||
fwrite( $ifp, base64_decode( $img[ 1 ] ) );
|
||||
}
|
||||
fclose( $ifp );
|
||||
$MyFile = file_get_contents($src_local_file);
|
||||
if( in_array($image['img_name'] ,$is_this_multiple_image))
|
||||
{ $first2character = substr($image['img_name'], 0, 2);
|
||||
$char = ${$first2character};
|
||||
$doc_name = $image['img_name']."_".$char;
|
||||
${$first2character}++;
|
||||
}
|
||||
$CI->zip->add_data('pdimages/'.$doc_name.'.png',$MyFile);
|
||||
unlink($src_local_file);
|
||||
}
|
||||
|
||||
$temp_path = $main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
|
||||
|
||||
$CI->zip->archive($CI->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>($CI->external_path.'/pd_reports/'.$pdid.'/'.$temp_path));
|
||||
|
||||
$s3result= $CI->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
//print_r($s3result);
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
//$result_array[0]['content']
|
||||
$where_condition_array = array("pd_id" => $pdid);
|
||||
$temp_array['is_zip_created'] = 1;
|
||||
$id = $CI->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array);
|
||||
unlink($CI->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||
}
|
||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
}else return "";
|
||||
}
|
||||
|
||||
}
|
||||
public static function covertSMCImgs2PDF($pdid,$random_string,$pd_master_details = array(),$regenerate = 0)
|
||||
{
|
||||
$CI =&get_instance();
|
||||
$CI->load->model('PD_Model');
|
||||
$CI->load->model('SMC_Credit_PD_Model');
|
||||
$CI->load->library('pdfgenerator');
|
||||
|
||||
if(!count($pd_master_details))
|
||||
{
|
||||
$pd_master_details = $CI->PD_Model->getPDMasterDetails($pdid,$random_string);
|
||||
}
|
||||
set_time_limit(60);
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||
$main_applicant_name = $pd_master_details[0]['main_applicant'];
|
||||
|
||||
//get zip url from s3 if any
|
||||
|
||||
$key = 'pd'.$pdid.'/'.$main_applicant_name.'_'.$pdid.'_'.'pd_images.pdf';
|
||||
|
||||
//$singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
if($pd_master_details[0]['is_img_pdf_created'] && ($regenerate == 0))
|
||||
{
|
||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+7 days');
|
||||
}
|
||||
else
|
||||
{
|
||||
$all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||
// $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||
if(count($all_pd_images)>0){
|
||||
|
||||
$data_to_view['all_pd_images'] = $all_pd_images;
|
||||
$img_pdf_data = $CI->load->view('report_templates/PDSMCIMG_PDF',$data_to_view,true);
|
||||
//print_r($img_pdf_data);die();
|
||||
$pdf_doc = $CI->pdfgenerator->generate($img_pdf_data, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
//End of PDF Gen using DOM PDF
|
||||
$output_file2 = $CI->external_path ."/pd_reports/" . $pdid . "/pd_images_pdf.pdf";
|
||||
$ti = file_put_contents($output_file2, $pdf_doc);
|
||||
//echo $ti;die();
|
||||
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>($output_file2));
|
||||
|
||||
$s3result= $CI->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
//print_r($s3result);
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
//$result_array[0]['content']
|
||||
$where_condition_array = array("pd_id" => $pdid);
|
||||
$temp_array['is_img_pdf_created'] = 1;
|
||||
$id = $CI->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array);
|
||||
unlink($output_file2);
|
||||
}
|
||||
|
||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+7 days');
|
||||
}
|
||||
else return "";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -44,6 +44,31 @@ class url_shortener
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function SMC_report_url_shorten($pdid,$random_string,$type = '')
|
||||
{
|
||||
//echo 'this is from daiu';
|
||||
$CI =&get_instance();
|
||||
$CI->load->model('PD_Model');
|
||||
|
||||
$date_of_creation = date('Ymd');
|
||||
$uri = array();
|
||||
if($type)
|
||||
{
|
||||
$uri[ $type ] = $type.'/'.$date_of_creation.'/'.$pdid.'/'.$random_string;
|
||||
}
|
||||
else
|
||||
{
|
||||
$uri[ 'ppdf' ] = custom_encryption::encode ( 'ppdf/'.$date_of_creation.'/'.$pdid.'/'.$random_string);
|
||||
$uri[ 'zip' ] = custom_encryption::encode ( 'zip/'.$date_of_creation.'/'.$pdid.'/'.$random_string );
|
||||
}
|
||||
// print_r($uri);die();
|
||||
return $uri;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -9,19 +9,22 @@ class video_grabber_helper
|
||||
|
||||
}
|
||||
|
||||
public function grabAllVideo($pdid,$random_string,$pd_master_details = array())
|
||||
public function grabAllVideo($pdid,$random_string,$pd_master_details = array(),$pd_category)
|
||||
{
|
||||
$CI =&get_instance();
|
||||
// $CI->load->helper('url_shortener');
|
||||
|
||||
if(!count($pd_master_details))
|
||||
{
|
||||
$pd_master_details = $CI->PD_Model->getPDMasterDetails($pd_id,$random_string);
|
||||
if($pd_category == '2'){
|
||||
$pd_master_details = $CI->PD_Model->selectCustomRecords(array('sales_pd_id as pd_id', 'lender_id as fk_lender_id', 'product_id', 'sales_pd_type','isactive', 'rand_string as random_string', 'pd_branch_id'),array('sales_pd_id' => $pd_id,'rand_string'=>$random_string),SALES_PD_DATA);}
|
||||
if($pd_category == '1'){
|
||||
$pd_master_details = $CI->PD_Model->getPDMasterDetails($pd_id,$random_string);}
|
||||
}
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||
|
||||
$result_data = array();
|
||||
$query = "SELECT * FROM ".VIDEO_ROOM_INFO." where fk_pd_id = $pdid and isactive = 1";
|
||||
$query = "SELECT * FROM ".VIDEO_ROOM_INFO." where fk_pd_id = $pdid and isactive = 1 and pd_category = $pd_category";
|
||||
$video_info = $CI->db->query($query);
|
||||
// print_r($video_info->result_array());die();
|
||||
if($video_info->num_rows())
|
||||
|
||||
@ -141,6 +141,8 @@ class Data_Dump_Model extends SPARQ_Model {
|
||||
$select = "userid";$where = "concat(m_user_profile.first_name, ' ', m_user_profile.last_name)";$table = "m_user_profile";}
|
||||
if($flag == 9){ $value = trim($keyword);$value = strtolower($value);
|
||||
$select = "userid";$where = "first_name";$table = "m_user_profile";}
|
||||
if($flag == 10){ $value = trim($keyword);$value = strtolower($value);
|
||||
$select = "title_id";$where = "name";$table = "m_titles";}
|
||||
|
||||
$this->db->select($select);
|
||||
$this->db->from($table);
|
||||
|
||||
@ -14,7 +14,7 @@ class Entity_Management_Model extends SPARQ_Model {
|
||||
{
|
||||
$result_data = array();
|
||||
|
||||
$this->db->SELECT('ENTITY.entity_id, ENTITY.full_name, ENTITY.short_name,ENTITY.createdon, ENTITY.fk_createdby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby, ENTITY.updatedon, ENTITY.fk_updatedby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, ENTITY.isactive,ENTITY.fk_entity_type_id,ENTITYTYPE.name as entity_name,ENTITY.is_otp_enabled,ENTITY.is_score_card_enabled,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,ENTITY.is_face_api_enabled');
|
||||
$this->db->SELECT('ENTITY.entity_id, ENTITY.full_name, ENTITY.short_name,ENTITY.createdon, ENTITY.fk_createdby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby, ENTITY.updatedon, ENTITY.fk_updatedby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, ENTITY.isactive,ENTITY.fk_entity_type_id,ENTITYTYPE.name as entity_name,ENTITY.is_otp_enabled,ENTITY.is_score_card_enabled,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,ENTITY.is_face_api_enabled,ENTITY.digilocker_access');
|
||||
$this->db->FROM(ENTITY.' as ENTITY');
|
||||
$this->db->JOIN(USERPROFILE.' as USERPROFILE','ENTITY.fk_createdby = USERPROFILE.userid','LEFT');
|
||||
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','ENTITY.fk_updatedby = USERPROFILE1.userid','LEFT');
|
||||
|
||||
@ -8,23 +8,31 @@ class Flyhi_Model extends SPARQ_Model {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
public function getSalesPDListwithFilters($pd_status = '',$pd_from_date = '',$pd_to_date = '',$pd_products = '',$pd_lender = '',$pd_applicant_name = '',$pd_officer_name = '',$sales_pd_officer_id,$sales_pd_type = '') {
|
||||
public function getFlyPDListwithFilters($pd_status = '',$pd_from_date = '',$pd_to_date = '',$pd_products = '',$pd_lender = '',$pd_applicant_name = '',$sales_pd_officer_id,$sales_pd_type = '') {
|
||||
// SALES_PD_DATA.sales_pd_sno, SALES_PD_DATA.sales_pd_id, SALES_PD_DATA.applicant_name,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name,SALES_PD_DATA.applicant_id,SALES_PD_DATA.lender_id,SALES_PD_DATA.product_id,SALES_PD_DATA.is_pdf,SALES_PD_DATA.is_edited,ENTITY.short_name,PRODUCTS.abbr,DATE_FORMAT(SALES_PD_DATA.createdon, "%d/%m/%Y") as pd_createdon,SALES_PD_DATA.status
|
||||
$this->db->SELECT(' SALES_PD_DATA.sales_pd_sno, SALES_PD_DATA.sales_pd_id, SALES_PD_DATA.applicant_name,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name,SALES_PD_DATA.applicant_id,SALES_PD_DATA.lender_id,SALES_PD_DATA.product_id,SALES_PD_DATA.is_pdf,SALES_PD_DATA.is_edited,ENTITY.short_name,PRODUCTS.abbr,
|
||||
$this->db->SELECT(' SALES_PD_DATA.sales_pd_sno, SALES_PD_DATA.sales_pd_id, SALES_PD_DATA.applicant_name,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name,SALES_PD_DATA.applicant_id,SALES_PD_DATA.lender_id,SALES_PD_DATA.product_id,SALES_PD_DATA.is_pdf,SALES_PD_DATA.is_edited,ENTITY.full_name,ENTITY.short_name,PRODUCTS.abbr,
|
||||
(CASE WHEN SALES_PD_DATA.status = "STARTED" THEN SALES_PD_DATA.createdon WHEN SALES_PD_DATA.status = "COMPLETED" THEN SALES_PD_DATA.completed_date ELSE NULL END) AS createdon,
|
||||
DATE_FORMAT(SALES_PD_DATA.createdon, "%Y-%m-%d") as pd_createdon, SALES_PD_DATA.status,SALES_PD_DATA.sales_pd_type,SALES_PD_DATA.rand_string');
|
||||
DATE_FORMAT(SALES_PD_DATA.createdon, "%Y-%m-%d") as pd_createdon, SALES_PD_DATA.status,SALES_PD_DATA.sales_pd_type,SALES_PD_DATA.rand_string,SALES_PD_DATA.isactive,SALES_PD_DATA.city_id,CITY.name as city_name,
|
||||
SALES_PD_DATA.lender_sales_person,concat(LENDERSALESPERSON.first_name," ",LENDERSALESPERSON.last_name) as lender_sales_person_name,LENDERSALESPERSON.mobile_no as lender_sales_contact_mobileno,LENDERSALESPERSON.email as lender_sales_person_email,
|
||||
SALES_PD_DATA.lender_credit_person,concat(LENDERCREDITPERSON.first_name," ",LENDERCREDITPERSON.last_name) as lender_credit_person_name,LENDERCREDITPERSON.mobile_no as lender_credit_person_contact_mobileno,LENDERCREDITPERSON.email as lender_credit_person_email,
|
||||
SALES_PD_DATA.pd_branch_id,ENTITYLENDERBRANCH.branch_name,SALES_PD_DATA.loan_amount');
|
||||
$this->db->from(SALES_PD_DATA.' as SALES_PD_DATA');
|
||||
$this->db->join(ENTITY.' as ENTITY','ENTITY.entity_id = SALES_PD_DATA.lender_id','INNER');
|
||||
$this->db->join(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH','SALES_PD_DATA.pd_branch_id = ENTITYLENDERBRANCH.entity_lender_branch_id','LEFT');
|
||||
$this->db->join(PRODUCTS.' as PRODUCTS', 'PRODUCTS.product_id = SALES_PD_DATA.product_id','INNER');
|
||||
$this->db->join(USERPROFILE.' as USERPROFILE', 'USERPROFILE.userid = SALES_PD_DATA.createdby','INNER');
|
||||
$this->db->join(USERPROFILE.' as LENDERSALESPERSON', 'SALES_PD_DATA.lender_sales_person = LENDERSALESPERSON.userid','LEFT');
|
||||
$this->db->join(USERPROFILE.' as LENDERCREDITPERSON', 'SALES_PD_DATA.lender_credit_person = LENDERCREDITPERSON.userid','LEFT');
|
||||
$this->db->join(CITY.' as CITY', 'SALES_PD_DATA.city_id = CITY.city_id','LEFT');
|
||||
// echo $pd_from_date;
|
||||
if(!empty($pd_status)){
|
||||
$this->db->where_in('SALES_PD_DATA.status',$pd_status);
|
||||
}
|
||||
if(($pd_from_date != "" || $pd_from_date != null) && ($pd_to_date != "" || $pd_to_date != null)) {
|
||||
// $this->db->where('SALES_PD_DATA.createdon BETWEEN '. "'$pd_from_date'". ' AND '. "'$pd_to_date'" );
|
||||
if($pd_status[0] == "STARTED" ){
|
||||
if((!empty($pd_status)) && $pd_status[0] == "STARTED" ){
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d') BETWEEN ". "'$pd_from_date'". ' AND '. "'$pd_to_date'" );
|
||||
}else if($pd_status[0] == "COMPLETED" ){
|
||||
}else if((!empty($pd_status)) && $pd_status[0] == "COMPLETED" ){
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.completed_date,'%Y-%m-%d') BETWEEN ". "'$pd_from_date'". ' AND '. "'$pd_to_date'" );
|
||||
}else{
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.completed_date,'%Y-%m-%d') BETWEEN ". "'$pd_from_date'". ' AND '. "'$pd_to_date'" );
|
||||
@ -33,9 +41,9 @@ class Flyhi_Model extends SPARQ_Model {
|
||||
}
|
||||
else if($pd_from_date != "" && $pd_from_date != null) {
|
||||
// $this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d')",$pd_from_date);
|
||||
if($pd_status[0] == "STARTED" ){
|
||||
if((!empty($pd_status)) && $pd_status[0] == "STARTED" ){
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d')",$pd_from_date);
|
||||
}else if($pd_status[0] == "COMPLETED" ){
|
||||
}else if((!empty($pd_status)) && $pd_status[0] == "COMPLETED" ){
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.completed_date,'%Y-%m-%d')",$pd_from_date);
|
||||
}else{
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.completed_date,'%Y-%m-%d')",$pd_from_date);
|
||||
@ -44,9 +52,9 @@ class Flyhi_Model extends SPARQ_Model {
|
||||
}
|
||||
else if($pd_to_date != "" && $pd_to_date != null) {
|
||||
// $this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d')",$pd_to_date);
|
||||
if($pd_status[0] == "STARTED" ){
|
||||
if((!empty($pd_status)) && $pd_status[0] == "STARTED" ){
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d')",$pd_to_date);
|
||||
}else if($pd_status[0] == "COMPLETED" ){
|
||||
}else if((!empty($pd_status)) && $pd_status[0] == "COMPLETED" ){
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.completed_date,'%Y-%m-%d')",$pd_to_date);
|
||||
}else{
|
||||
$this->db->where("DATE_FORMAT(SALES_PD_DATA.completed_date,'%Y-%m-%d')",$pd_to_date);
|
||||
@ -62,9 +70,6 @@ class Flyhi_Model extends SPARQ_Model {
|
||||
if(!empty($pd_applicant_name)) {
|
||||
$this->db->like('SALES_PD_DATA.applicant_name',$pd_applicant_name);
|
||||
}
|
||||
if(!empty($pd_officer_name)) {
|
||||
$this->db->like('SALES_PD_DATA.officer_name',$pd_officer_name);
|
||||
}
|
||||
|
||||
if(!empty($sales_pd_officer_id)) {
|
||||
$this->db->WHERE('SALES_PD_DATA.createdby',$sales_pd_officer_id);
|
||||
@ -77,7 +82,7 @@ class Flyhi_Model extends SPARQ_Model {
|
||||
$this->db->limit(1000,0);
|
||||
$result = $this->db->get()->result_array();
|
||||
// if(ENVIRONMENT == 'development'){echo 'LAST QUERY '. $this->db->last_query();}
|
||||
//echo $this->db->last_query();die();
|
||||
// echo $this->db->last_query();die();
|
||||
return $result;
|
||||
}
|
||||
public function testSaleSection($id){
|
||||
|
||||
File diff suppressed because one or more lines are too long
198
api/application/views/digital_locker.php
Normal file
198
api/application/views/digital_locker.php
Normal file
@ -0,0 +1,198 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$uparrow = '<span style="color:green;">↑</span>';
|
||||
$downarrow = '<span style="color:red;">↓</span>';
|
||||
$dash = '<span style="color:black;"> </span>';
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<style type="text/css">
|
||||
|
||||
@page {
|
||||
margin: 100px 50px;
|
||||
font-family:Merriweather;
|
||||
}
|
||||
header {
|
||||
position: fixed;
|
||||
top: -70px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.headlines {
|
||||
font: 500 20px/32px Roboto,"Helvetica Neue",sans-serif;
|
||||
text-align: left;
|
||||
margin: 0; }
|
||||
|
||||
/* #########Score Card Table Styles######### */
|
||||
.scorecard_table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: inline;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table td, .scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
page-break-inside: inline;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: inline; }
|
||||
|
||||
.scorecard_table tr:hover {background-color: #ddd;}
|
||||
|
||||
.scorecard_table th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #FF0000;
|
||||
color: white;page-break-inside: inline;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
/* HTML - Red ;Hex Code - #FF0000;Decimal Code - (255,0,0) */
|
||||
.bodycss{
|
||||
font-weight: 400;
|
||||
font-size: 1.2rem;
|
||||
color: rgba(0,0,0,.87);
|
||||
line-height: 1.5;
|
||||
font-family: Roboto,"Helvetica Neue",sans-serif;
|
||||
padding: 0 40px;
|
||||
}
|
||||
.buttoncss{
|
||||
background-color: #FF0000;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.branding {
|
||||
display: block;
|
||||
border-bottom: 2px solid red;
|
||||
page-break-inside: inline;
|
||||
|
||||
}
|
||||
|
||||
.fa-disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
|
||||
a i {
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
|
||||
a:hover i {
|
||||
transform: scale(1.5);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
<title><?php echo $page_title; ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="branding"><a><img src="https://pdgenie.com/logo/sineedge_red.png" style="height: 45px;"></a></div>
|
||||
<br>
|
||||
<div class="bodycss">
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
<img style="width:100px;height:50px;opacity: 0.5;padding-top: 5px;" src='https://pdgenie.com/logo/sineedge_red.png'/> Powered By PD Genie Team
|
||||
</footer>
|
||||
<header>
|
||||
<div>
|
||||
<img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png'/>
|
||||
</div>
|
||||
<hr>
|
||||
</header>
|
||||
<?php
|
||||
if(count($list))
|
||||
{
|
||||
echo '<div>
|
||||
<span class="headlines">
|
||||
<span style= "font-weight: bold;"> Digital Documents</span>
|
||||
<br>
|
||||
PD Number : "<i>'.$pd_sno.'/'.$pd_id.'</i>"<br>
|
||||
Applicant Name : "<i>'.$applicant_name.'</i>"</span>
|
||||
</div>';
|
||||
|
||||
echo ' <table class="scorecard_table"><tbody>
|
||||
<tr>
|
||||
<th colspan="1" > Sr. No. </th>
|
||||
<th colspan="3" > Document Name</th>
|
||||
<th colspan="1" > Document Uploaded Date</th>
|
||||
<th colspan="2" > Document Description</th>
|
||||
<th colspan="2" > Document Issuer</th>
|
||||
<th colspan="1" > Action </th></tr>';
|
||||
|
||||
|
||||
for($i=0;$i<count($list['items']);$i++){
|
||||
echo '<tr><td colspan="1" ><div style="text-align:right;padding-right: 8px;">'.($i+1).'</div></td>'; //checkbox
|
||||
echo '<td colspan="3"><div style="text-align:left;padding-left: 8px;">'.$list['items'][$i]['name'].'</td>';
|
||||
echo '<td colspan="1"><div style="text-align:center">'.$list['items'][$i]['date'].'</td>';
|
||||
echo '<td colspan="2"><div style="text-align:left;padding-left: 8px;">'.$list['items'][$i]['description'].'</td>';
|
||||
echo '<td colspan="2"><div style="text-align:left;padding-left: 8px;">'.$list['items'][$i]['issuer'].'</td>';
|
||||
echo '<td colspan="2"><div style="text-align:center;">
|
||||
<form id="form1" name="form1" method="post" action="previewDigiLockerDocs" target="_blank">
|
||||
<input type="hidden" id="token" name="token" value='.$token.'>
|
||||
<input type="hidden" id="pd_id" name="pd_id" value='.$pd_id.'>
|
||||
<input type="hidden" id="applicant_name" name="applicant_name" value='.$applicant_name.'>
|
||||
<input type="hidden" id="applicant_id" name="applicant_id" value='.$applicant_id.'>
|
||||
<input type="hidden" id="doc_name" name="doc_name" value='.$list['items'][$i]['name'].'>
|
||||
<input type="hidden" id="doc_uri" name="doc_uri" value='.$list['items'][$i]['uri'].'>
|
||||
<button class="buttoncss" data-toggle="tooltip" data-placement="right" type="submit"><i class="fa fa-download" title="Preview/Download PDF"></i></button></td>
|
||||
</form>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
// <a class="link" href="previewDigiLockerDocs?doc='.$list['items'][$i]['uri'].'&token='.$token.'" target="_blank"><i class="fa fa-download" title="Download PDF"></i></a>
|
||||
// <div style="text-align:right;">
|
||||
// <button class="buttoncss" data-toggle="tooltip" title="Download" data-placement="right" type="submit"><i class="fa fa-download"></i> Download</button>
|
||||
// </div>
|
||||
}
|
||||
else{
|
||||
echo '<table class="scorecard_table"><tbody>
|
||||
<tr>
|
||||
<th colspan="1" > Sr. No. </th>
|
||||
<th colspan="3" > Document Name</th>
|
||||
<th colspan="1" > Document Uploaded Date</th>
|
||||
<th colspan="2" > Document Description</th>
|
||||
<th colspan="2" > Document Issuer</th>
|
||||
<th colspan="2" > Action</th></tr>
|
||||
<tr><td colspan="10"><div style="text-align:center">There is No Digi-Locker Docs</div></td></tr>
|
||||
</tbody></table><br>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -468,7 +468,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -620,6 +623,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
|
||||
@ -635,6 +639,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -706,30 +717,64 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -1092,6 +1137,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
@ -2010,7 +2056,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '<tr><td>USP of the business (How applicant’s business is different from others in the business)</td><td>'.$future_plan_business_environment['usp_of_the_business'].'</td></tr>';
|
||||
|
||||
echo '<tr><td>Future plan for business expansion</td><td>'.$future_plan_business_environment['future_plans_for_business_expansion'].'</td></tr>';
|
||||
echo '<tr><td>Impact of GST on business</td><td>'.$future_plan_business_environment['impact_of_gst_on_the_business'].'</td></tr>';
|
||||
// echo '<tr><td>Impact of GST on business</td><td>'.$future_plan_business_environment['impact_of_gst_on_the_business'].'</td></tr>';
|
||||
echo '<tr><td>Key competitors in the business</td><td>'.$future_plan_business_environment['key_competitors'].'</td></tr>';
|
||||
echo '<tr><td>Succession Plan for business</td><td>'.$future_plan_business_environment['succession_plan'].'</td></tr>';
|
||||
echo '<tr><td>Brief of other group concerns/ Business run by the applicant</td><td>'.$future_plan_business_environment['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'].'</td></tr>';
|
||||
|
||||
@ -474,7 +474,10 @@ font-weight: bolder;;
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -627,6 +630,7 @@ font-weight: bolder;;
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
|
||||
@ -642,6 +646,13 @@ font-weight: bolder;;
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -713,30 +724,63 @@ font-weight: bolder;;
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -2017,7 +2061,7 @@ font-weight: bolder;;
|
||||
echo '<tr><td>USP of the business (How applicant’s business is different from others in the business)</td><td>'.$future_plan_business_environment['usp_of_the_business'].'</td></tr>';
|
||||
|
||||
echo '<tr><td>Future plan for business expansion</td><td>'.$future_plan_business_environment['future_plans_for_business_expansion'].'</td></tr>';
|
||||
echo '<tr><td>Impact of GST on business</td><td>'.$future_plan_business_environment['impact_of_gst_on_the_business'].'</td></tr>';
|
||||
// echo '<tr><td>Impact of GST on business</td><td>'.$future_plan_business_environment['impact_of_gst_on_the_business'].'</td></tr>';
|
||||
echo '<tr><td>Key competitors in the business</td><td>'.$future_plan_business_environment['key_competitors'].'</td></tr>';
|
||||
echo '<tr><td>Succession Plan for business</td><td>'.$future_plan_business_environment['succession_plan'].'</td></tr>';
|
||||
echo '<tr><td>Brief of other group concerns/ Business run by the applicant</td><td>'.$future_plan_business_environment['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'].'</td></tr>';
|
||||
|
||||
@ -468,7 +468,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -621,6 +624,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
|
||||
@ -636,6 +640,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -707,32 +718,65 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo ' ';
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -1093,6 +1137,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
@ -2013,7 +2058,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '<tr><td>USP of the business (How applicant’s business is different from others in the business)</td><td>'.$future_plan_business_environment['usp_of_the_business'].'</td></tr>';
|
||||
|
||||
echo '<tr><td>Future plan for business expansion</td><td>'.$future_plan_business_environment['future_plans_for_business_expansion'].'</td></tr>';
|
||||
echo '<tr><td>Impact of GST on business</td><td>'.$future_plan_business_environment['impact_of_gst_on_the_business'].'</td></tr>';
|
||||
// echo '<tr><td>Impact of GST on business</td><td>'.$future_plan_business_environment['impact_of_gst_on_the_business'].'</td></tr>';
|
||||
echo '<tr><td>Key competitors in the business</td><td>'.$future_plan_business_environment['key_competitors'].'</td></tr>';
|
||||
echo '<tr><td>Succession Plan for business</td><td>'.$future_plan_business_environment['succession_plan'].'</td></tr>';
|
||||
echo '<tr><td>Brief of other group concerns/ Business run by the applicant</td><td>'.$future_plan_business_environment['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'].'</td></tr>';
|
||||
|
||||
@ -10,8 +10,8 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<style type="text/css">
|
||||
|
||||
.page_break { page-break-before: always; }
|
||||
#page_break { page-break-before: always; }
|
||||
@ -459,7 +459,7 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
}
|
||||
|
||||
#ini_table td{
|
||||
word-wrap:break-word
|
||||
word-wrap:break-word;
|
||||
width:50%;
|
||||
}
|
||||
|
||||
@ -470,7 +470,18 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.facecrop_row {
|
||||
display: flex;
|
||||
}
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column {
|
||||
flex: 33.33%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -617,6 +628,7 @@ if ( isset($pdf) ) {
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
|
||||
@ -632,6 +644,13 @@ if ( isset($pdf) ) {
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -703,31 +722,60 @@ if ( isset($pdf) ) {
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -1109,6 +1157,7 @@ if ( isset($pdf) ) {
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
@ -5109,14 +5158,7 @@ if($total_no_of_business > 0) {
|
||||
echo "</table>";
|
||||
}
|
||||
// ########################### End Of Score Card Section #########################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@ -467,7 +467,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -690,24 +693,43 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo "</div>";
|
||||
echo '<br>';
|
||||
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo '<p style="text-align:left;">Similarity
|
||||
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span>
|
||||
</p>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%">
|
||||
'.round($ci[$i]["Similarity"]).'
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}}
|
||||
|
||||
|
||||
|
||||
@ -731,7 +753,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach ($add_on_pd_images as $pd_level_key => $single_pd_images)
|
||||
{
|
||||
|
||||
@ -756,6 +778,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
@ -830,6 +859,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
echo '</div>';
|
||||
@ -1330,6 +1364,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
|
||||
@ -477,7 +477,10 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
font-size: 14px;
|
||||
font-weight: bolder;;
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -621,6 +624,7 @@ if ( isset($pdf) ) {
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
|
||||
@ -636,6 +640,13 @@ if ( isset($pdf) ) {
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -707,31 +718,64 @@ if ( isset($pdf) ) {
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -1102,6 +1146,7 @@ if ( isset($pdf) ) {
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
|
||||
@ -7,7 +7,7 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -459,7 +459,7 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
}
|
||||
|
||||
#ini_table td{
|
||||
word-wrap:break-word
|
||||
word-wrap:break-word;
|
||||
width:50%;
|
||||
}
|
||||
|
||||
@ -470,9 +470,12 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
@ -606,6 +609,7 @@ if ( isset($pdf) ) {
|
||||
<tr><td> --><?php
|
||||
//print_r($pd_images[18]);
|
||||
$person_met_data = array();
|
||||
// print_r($general_form['individuals']);
|
||||
foreach($general_form['individuals'] as $ind_key => $individual)
|
||||
{
|
||||
//print_r($individual);die();
|
||||
@ -619,6 +623,7 @@ if ( isset($pdf) ) {
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
|
||||
@ -634,6 +639,16 @@ if ( isset($pdf) ) {
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -705,31 +720,58 @@ if ( isset($pdf) ) {
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo '<p style="text-align:left;">Similarity
|
||||
<span style="float:right;">'.$similarity.' %</span>
|
||||
</p>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -5028,7 +5070,11 @@ if($total_no_of_business > 0) {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
const parentDOM = document.getElementsByClassName("PB-html");
|
||||
const test = parentDOM;
|
||||
test[0].style.background = "white";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
707
api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php
Normal file
707
api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php
Normal file
@ -0,0 +1,707 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<style type="text/css">
|
||||
.page_break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
#page_break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
/*.page { width: 100%; height: 95%; }*/
|
||||
@page {
|
||||
margin: 100px 50px;
|
||||
/*font-family:Helvetica,Arial;*/
|
||||
font-family: Merriweather;
|
||||
}
|
||||
|
||||
header {
|
||||
position: fixed;
|
||||
top: -70px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: right;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: left;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
.non-editable {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
color: #e00201;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card Div Styles######### */
|
||||
#rcorners_green {
|
||||
background: #33cc33;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_red {
|
||||
background: red;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_light_green {
|
||||
background: #99ff66;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_amber {
|
||||
background: #ff9900;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card DIv Styles######### */
|
||||
|
||||
/* #########Score Card Table Styles######### */
|
||||
.scorecard_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table td,
|
||||
.scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: avoid;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.scorecard_table th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
page-break-inside: avoid;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
/* #########Score Card for personal assest section table getting overlapped ######### */
|
||||
|
||||
.scorecard_table_resonal_assest {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest td,
|
||||
.scorecard_table_resonal_assest th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
#first_div {
|
||||
width: 150px;
|
||||
height: 25px;
|
||||
border: 2px outset #000;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
/*padding-left: 20px;*/
|
||||
|
||||
}
|
||||
|
||||
#tick_div {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 100%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#tick_div_other {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 93%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS START ######### */
|
||||
#ini_table {
|
||||
table-layout: fixed;
|
||||
width: 80%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ini_table td {
|
||||
word-wrap: break-word;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function saveEdits(e) {
|
||||
|
||||
var editElem = document.getElementById("mydoc");
|
||||
var userVersion = editElem.innerHTML;
|
||||
//localStorage.removeItem('userEdits')
|
||||
//save the content to local storage
|
||||
localStorage.userEdits = userVersion;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
Powered by PD Genie™
|
||||
</footer>
|
||||
|
||||
<header>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png' /></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<!-- Wrap the content of your PDF inside a main tag -->
|
||||
<?php
|
||||
$main_applicant_name = $pd_master_details[0]['title_name'] . ' ' . $pd_master_details[0]['main_applicant'];
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$company_name = "";
|
||||
?>
|
||||
<?php
|
||||
echo "<br><br>";
|
||||
echo "<div>";
|
||||
echo "<h1><center>VISIT REPORT</center></h1> ";
|
||||
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
|
||||
echo "<h2><center>" . $main_applicant_name . "</center></h2>";
|
||||
echo "</div>";
|
||||
echo "<br><br><br><br>";
|
||||
?>
|
||||
|
||||
<table align="center" id="ini_table" border="0">
|
||||
<tbody>
|
||||
<?php
|
||||
echo '<tr><td>Visit Initiated Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['createdon'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['pd_visit_date'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Report Date </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['pd_report_generated_date'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Initiated by </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['lender_full_name'] . '</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> Home Loan </td></tr>';
|
||||
echo '<tr><td>Customer Segment </td> <td style="width:2%;">:</td> <td> Self Employed </td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<p></p>";
|
||||
|
||||
$header_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 1);
|
||||
if (isset($header_lender_disclaimer['disclaimer']) && $header_lender_disclaimer['disclaimer'] != '' && $header_lender_disclaimer['type'] == 1) {
|
||||
echo '<p align="justify"><i><strong>Disclaimer: </strong>' . $header_lender_disclaimer['disclaimer'] . '</i></p>';
|
||||
}
|
||||
|
||||
echo '<p align="justify"><i><strong>Registered / Corporate Office:</strong> SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002</i></p>';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- ####################### general information ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>GENERAL INFORMATION</u>: </h3>';
|
||||
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
|
||||
$value = $general_form['json'];
|
||||
$all_applicant_details = $applicants_details;
|
||||
if (strtoupper($value['is_person_met']) == 'YES') {
|
||||
echo '<p>' . 'Applicant <b>(' . $value['Name_of_the_Person_met_master'] . ')</b> was met at the visited address.' . '</p>';
|
||||
} else if (strtoupper($value['is_person_met']) == 'NO') {
|
||||
echo '<p>' . '(' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '</p>';
|
||||
}
|
||||
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
|
||||
echo '<p>' . $general_form['general_remark'] . '</p>';
|
||||
}
|
||||
?>
|
||||
<!-- ####################### general information ends ############################-->
|
||||
|
||||
<!-- ####################### address details ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
|
||||
$address_value = $address_form['json'];
|
||||
if (!empty($address_value)) {
|
||||
echo '<h3 contenteditable="true"><u>ADDRESS DETAILS</u>: </h3>';
|
||||
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
|
||||
echo '<p>' . '
|
||||
<b>Visit Initiated Address:</b> ' . $address_value['initiated_address'] . ' , ' . $address_value['city_master'] . ' , ' . $address_value['state_master'] . ' , ' . $address_value['pincode_master'] . '. </p>';
|
||||
}
|
||||
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'NO') {
|
||||
echo '<p>' . '
|
||||
<b>Address Where Visit is Initiated:</b> ' . $address_value['initiated_address'] . ' , ' . $address_value['city_master'] . ' , ' . $address_value['state_master'] . ' , ' . $address_value['pincode_master'] . '.
|
||||
<b>Address Where Visit was actually done:</b> ' . $address_value['actual_pd_address'] . ' , ' . $address_value['city2_master'] . ' , ' . $address_value['state2_master'] . ' , ' . $address_value['pincode2_master'] . '.
|
||||
<b>Reason for change in Visit address:</b> ' . $address_value['end_use'] . '.</p>';
|
||||
}
|
||||
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. The <b>' . $address_value['address_type_master'] . '</b> is located in a <b>' . $address_value['locality_master'] . '</b> and the estimated area of the <b>' . $address_value['address_type_master'] . '</b> is <b>' . $address_value['uom_master'] . '</b>. The location was <b>' . $address_value['Approach_to_PD_location'] . '</b>. As Per Officer, the <b>' . $address_value['address_type_master'] . '</b> is situated in a <b>' . $address_value['comment_locality_master'] . '</b> Locality. ' . '</p>';
|
||||
}
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### address details ends ############################-->
|
||||
|
||||
<!-- ####################### office visit DI ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>VISIT DETAILS</u>: </h3>';
|
||||
$Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true);
|
||||
$ov_value = $Office_visit_data['json'];
|
||||
|
||||
$business_activities_during_visit = implode(', ', $ov_value['Was_any_business_activities_observed_during_visit']);
|
||||
$business_activities_during_visit = preg_replace("/_/i", ' ', $business_activities_during_visit);
|
||||
$business_activities_during_visit = ucwords($business_activities_during_visit);
|
||||
$company_name_sighted = strtoupper($ov_value['was_the_company_name_board_sighted']) == 'YES' ? 'seen' : 'not seen';
|
||||
|
||||
echo '<ul><li style="margin: 15px 0;"><b>Brief of the Business / Service Model:</b> ' . $ov_value['business_brief'] . '.</li>
|
||||
<li style="margin: 15px 0;">Visited address is of a <b>' . $ov_value['visited_address_is'] . '</b>.</li>
|
||||
<li style="margin: 15px 0;">At the time of visit, the officer sighted <b>' . $ov_value['no_of_employees_sighted_by_PD_officer_during_visit'] . '</b> employees at the business premises.</li>
|
||||
<li style="margin: 15px 0;">The Business Name board was <b>' . $company_name_sighted . '</b> at the visited address.</li>';
|
||||
if (strtoupper($ov_value['do_you_want_to_add_other_documents']) == 'YES') {
|
||||
echo '<li style="margin: 15px 0;"> <b>' . $ov_value['remarks_others'] . '</b> was sighted during visit and pictures are enclosed with the Report.</li>';
|
||||
}
|
||||
if ($ov_value['Visited_address_is_rented'] != 'not disclosed ') {
|
||||
echo '<li style="margin: 15px 0;">The <b>' . $ov_value['visited_address_is'] . '</b> is <b>' . $ov_value['Visited_address_is_rented'] . '</b>.</li>';
|
||||
}
|
||||
if ($ov_value['Visited_address_is_rented'] == 'not disclosed ') {
|
||||
echo '<li style="margin: 15px 0;">The <b>' . $ov_value['visited_address_is'] . '</b> is Rented or Owned is Not Disclosed by the person met.</li>';
|
||||
}
|
||||
echo '<li style="margin: 15px 0;">Business Activity was <b>' . $company_name_sighted . '</b> and <b>' . $business_activities_during_visit . '</b> </li>';
|
||||
if (strtoupper($ov_value['stock_photograph']) == 'YES') {
|
||||
echo '<li style="margin: 15px 0;">Stock was seen during visit and pictures are enclosed with the Report.</li>';
|
||||
}
|
||||
if (strtoupper($ov_value['stock_photograph']) == 'NO') {
|
||||
echo '<li style="margin: 15px 0;">Stock was not seen during visit because <b>' . $ov_value['reason_of_stock_non_availability'] . '</b> .</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### office visit DI ends ############################-->
|
||||
|
||||
<!-- ################# neighbourhood/reference check #################-->
|
||||
<?php
|
||||
|
||||
$pd_offiecer_status_about_neighbor = "";
|
||||
$neighbour_details = json_decode($pd_processed_forms[32][0]['processed_json'], true);
|
||||
$neighbour_value = $neighbour_details['json'];
|
||||
// print_r($neighbour_value);
|
||||
|
||||
// if(strcasecmp($neighbour_value['neighbourhood_status'],'Could Not Verify')){
|
||||
$pd_offiecer_status_about_neighbor = $neighbour_value['neighbourhood_status'];
|
||||
// }
|
||||
$neighbourhood_form_common_remarks = isset($neighbour_value['neighbourhood_remarks']) ? $neighbour_value['neighbourhood_remarks'] : null;
|
||||
|
||||
?>
|
||||
<h3 contenteditable="true"><u>NEIGHBOURHOOD / REFERENCE CHECK</u></h3>
|
||||
<?php
|
||||
|
||||
//echo $pd_offiecer_status_about_neighbor;
|
||||
if (count($neighbour_value) > 0) {
|
||||
|
||||
$neighbourhood_name = 'Neighbour Check was done with ';
|
||||
$neighbourhood_name .= $neighbour_value['neighbourhood_name'] . '.';
|
||||
$neighbourhood_do_know = null;
|
||||
$neighbourhood_business_running_yr = null;
|
||||
$ownership = null;
|
||||
$neighbourhood_name_only = $neighbour_value['neighbourhood_name'];
|
||||
if (strtoupper($neighbour_value['do_know']) == 'YES') {
|
||||
$neighbourhood_do_know = $neighbour_value['neighbourhood_name'] . " knows about applicants and their business.";
|
||||
} else if (strtoupper($neighbour_value['do_know']) == 'NO') {
|
||||
$neighbourhood_do_know = $neighbour_value['neighbourhood_name'] . " did not know about the applicant or their business.";
|
||||
}
|
||||
if ($neighbour_value['how_long_do_know_in_year'] || $neighbour_value['how_long_do_know_in_month']) {
|
||||
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name'] . " confirmed that the business has been in operation for ";
|
||||
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_year'] == 1) ? $neighbour_value['how_long_do_know_in_year'] . " year" : (($neighbour_value['how_long_do_know_in_year'] > 1) ? $neighbour_value['how_long_do_know_in_year'] . " years" : "");
|
||||
$neighbour_value['how_long_do_know_in_year'] && $neighbour_value['how_long_do_know_in_month'] ? $neighbourhood_business_running_yr .= ' and ' : '';
|
||||
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_month'] == 1) ? $neighbour_value['how_long_do_know_in_month'] . " month" : (($neighbour_value['how_long_do_know_in_month'] > 1) ? $neighbour_value['how_long_do_know_in_month'] . " months" : "");
|
||||
$neighbourhood_business_running_yr .= '.';
|
||||
} else {
|
||||
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name'] . " was not aware of how long the business is in operation.";
|
||||
}
|
||||
$ownwers_list = '';
|
||||
if (isset($neighbour_value['know_organisation_owner']) && strtoupper($neighbour_value['know_organisation_owner']) == 'YES') {
|
||||
if (isset($neighbour_value['organisation_owner'])) {
|
||||
// echo "type" . gettype($neighbour_value['organisation_owner']);
|
||||
for ($i = 0; $i < count($neighbour_value['organisation_owner']); $i++) {
|
||||
$owner = $neighbour_value['organisation_owner'][$i];
|
||||
if ($owner != 0) {
|
||||
$title = MYUTIL::applicantTitleName($applicants_details, $owner);
|
||||
$ownwers_list .= $title . ' ' . APPLICANTNAME_GRABBER::getApplicantsNameById($owner, $applicants_details) . ' , ';
|
||||
} else {
|
||||
$ownwers_list .= ' ' . $neighbour_value['other_organisation_owner'] . ' , ';
|
||||
}
|
||||
}
|
||||
//echo $ownwers_list;
|
||||
//$ownwers_list = substr_replace($ownwers_list,'', strrpos(-$ownwers_list,','),1);
|
||||
//echo $ownwers_list;
|
||||
//echo $ownwers_list;echo "**********";
|
||||
|
||||
$ownwers_list = substr_replace($ownwers_list, '', strrpos($ownwers_list, ','), 1);
|
||||
if (strrpos($ownwers_list, ',')) {
|
||||
$ownwers_list = substr_replace($ownwers_list, ' and ', strrpos($ownwers_list, ','), 1);
|
||||
}
|
||||
|
||||
|
||||
$grammer1 = count($neighbour_value['organisation_owner']) > 1 ? ' are ' : ' is ';
|
||||
$grammer2 = count($neighbour_value['organisation_owner']) > 1 ? 'owners' : 'owner';
|
||||
$ownership = 'As per ' . $neighbour_value['neighbourhood_name'] . ' the ' . $grammer2 . ' of ' . $company_name . $grammer1 . $ownwers_list . '.';
|
||||
}
|
||||
} else {
|
||||
$ownership = $neighbour_value['neighbourhood_name'] . " was not aware of the business ownership.";
|
||||
}
|
||||
$existNeighRefCheck = array('neighbourhood_name_only' => $neighbourhood_name_only, 'neighbourhood_name' => $neighbourhood_name, 'neighbourhood_do_know' => $neighbourhood_do_know, 'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr, 'ownership' => $ownership);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (!empty($existNeighRefCheck)) {
|
||||
$nfValue = $existNeighRefCheck;
|
||||
echo $nfValue['neighbourhood_name_only'];
|
||||
?>
|
||||
|
||||
<ul>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor; ?>.</span></li>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
} else { ?>
|
||||
<!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> -->
|
||||
<!-- <p>Neighbour Check was not possible due to Could not verify</p> -->
|
||||
<p>Status of the check: could not verify.</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($neighbourhood_form_common_remarks != "") {
|
||||
echo '<p>' . $neighbourhood_form_common_remarks . '</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- ################# neighbourhood/reference check ends #################-->
|
||||
|
||||
<!-- ################# credit manager specific query #################-->
|
||||
<?php
|
||||
$credit_officier_specific_queries = array();
|
||||
if (isset($pd_processed_forms[31])) {
|
||||
$credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
|
||||
}
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>CREDIT MANAGER`S SPECIFIC QUERIES</u>:</h3>';
|
||||
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
|
||||
foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) {
|
||||
echo 'Question - ' . $value['question'] . '<br>';
|
||||
echo 'Answer - ' . $value['answer'];
|
||||
echo '<br><br>';
|
||||
}
|
||||
} else {
|
||||
echo 'There are no specific queries raised by Credit Manager.';
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>DOCUMENT TO BE PHOTOGRAPHED/SCANNED</u>: </h3>';
|
||||
//
|
||||
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
|
||||
|
||||
|
||||
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
|
||||
echo 'Document Required : ' . $doc_value['doc_name'] . '<br>';
|
||||
echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '<br>' : 'NO<br>');
|
||||
if ($doc_value['ans'] != 'yes') {
|
||||
echo 'Reason : ' . $doc_value['reason'];
|
||||
}
|
||||
echo '<br><br>';
|
||||
}
|
||||
} else {
|
||||
echo 'There are no specific documents to be collect.';
|
||||
}
|
||||
|
||||
if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) {
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true">Queries related to Covid-19: </h3>';
|
||||
|
||||
foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) {
|
||||
if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) {
|
||||
echo 'Question : ' . $covid_value['question'] . '<br>';
|
||||
$temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||||
|
||||
if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) {
|
||||
$temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')';
|
||||
}
|
||||
echo 'Answer : ' . $temp_answer . '<br>';
|
||||
$sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||||
if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) {
|
||||
echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '<br>';
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
?>
|
||||
|
||||
<!-- ################# credit manager specific query ends#################-->
|
||||
|
||||
<!-- ################# final remarks #################-->
|
||||
<div class="page_break"></div>
|
||||
<br>
|
||||
<h3 contenteditable="true"><u>VISITING OFFICER`S REMARKS</u></h3>
|
||||
<?php
|
||||
$final_remark = json_decode($pd_processed_forms[33][0]['processed_json'], true);
|
||||
$final_remark_data = $final_remark['json'];
|
||||
//print_r($final_remark_data);
|
||||
|
||||
|
||||
$positive = null;
|
||||
$negative = null;
|
||||
$refer_to_credit = null;
|
||||
$Could_not_verfiy = null;
|
||||
$fo_diplay = null;
|
||||
|
||||
if (isset($final_remark_data['final_status_of_visit'])) {
|
||||
if ($final_remark_data['final_status_of_visit'] == 'Couldnotverfiy') {
|
||||
$Could_not_verfiy = 1;
|
||||
$fo_diplay = "Could not verfiy";
|
||||
} else if ($final_remark_data['final_status_of_visit'] == 'Positive') {
|
||||
$positive = 1;
|
||||
$fo_diplay = "Positive";
|
||||
} else if ($final_remark_data['final_status_of_visit'] == 'Negative') {
|
||||
$negative = 1;
|
||||
$fo_diplay = "Negative";
|
||||
}
|
||||
}
|
||||
$pd_officer_final_remark = isset($final_remark_data['common_remarks']) ? $final_remark_data['common_remarks'] : '';
|
||||
|
||||
|
||||
?>
|
||||
<div>
|
||||
|
||||
<ul>
|
||||
<?php $tick_mark = '<span style="font-family: DejaVu Sans; sans-serif;font-size:12px">✔</span>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<li>Final Status of Field Visit: </li>
|
||||
<br><br>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="first_div" style="border-color:green;color:black;">Positive</div>
|
||||
<div id="tick_div" style="border-color:green;color:black;"><?php if ($positive) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
<td style="padding-left:50px;">
|
||||
<div id="first_div" style="border-color:red;color:black;">Negative</div>
|
||||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($negative) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
<td style="padding-left:50px;">
|
||||
<div id="first_div" style="border-color:#ffff00;color:black;">Could not verfiy</div>
|
||||
<div id="tick_div" style="border-color:#ffff00;color:black;"><?php if ($Could_not_verfiy) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<br>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Remarks:</li>
|
||||
<?php echo '<p style="text-align:justify;">' . $pd_officer_final_remark . '</p>' ?>
|
||||
</div>
|
||||
<!-- ################# final remarks ends #################-->
|
||||
<!-- ################# satellite #################-->
|
||||
<?php
|
||||
if (!empty($distances['distance'])) {
|
||||
echo '<br><br><b> Distance to PD location : </b>' . $distances['distance'];
|
||||
}
|
||||
echo '<br><br><b> GPS Coordinates of location where PD Visit was done : </b>' . $pd_master_details[0]['start_location'];
|
||||
echo '<br><br>';
|
||||
?>
|
||||
<?php
|
||||
$satellite_url = '';
|
||||
if (isset($pd_images['common_images']) && count($pd_images['common_images'])) {
|
||||
foreach ($pd_images['common_images'] as $com_key => $com_value) {
|
||||
if ($com_value['pd_document_title'] == 'satellite') {
|
||||
$satellite_url = $com_value['doc_url'];
|
||||
unset($pd_images['common_images'][$com_key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<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>
|
||||
<!-- ################# satellite ends #################-->
|
||||
<!-- ################# common images #################-->
|
||||
|
||||
<?php
|
||||
// $filtered_arr = array_filter($pd_images['34'], function ($var) {
|
||||
// return ($var['isactive'] != 0);
|
||||
// });
|
||||
if (count($pd_images['34'])) {
|
||||
$pd_images['common_images'] = array_values($pd_images['34']);
|
||||
$tot_rows = ceil(count($pd_images['common_images']) / 2);
|
||||
echo '<div id="page_break"></div>';
|
||||
echo '<h3 contenteditable="true"><u>VISIT PICTURES</u></h3>';
|
||||
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
|
||||
|
||||
$add_factor = 0;
|
||||
for ($row = 0; $row < $tot_rows; $row++) {
|
||||
echo '<tr>';
|
||||
|
||||
$from = $row == 0 ? $row : ($row + $add_factor);
|
||||
$to = ($from + 2);
|
||||
$add_factor = $add_factor + 2;
|
||||
for ($i = $from; $i <= $to; $i++) {
|
||||
|
||||
if (isset($pd_images['common_images'][$i]) && ($pd_images['common_images'][$i]['pd_document_title'] != 'satellite')) {
|
||||
$doc_title = $pd_images['common_images'][$i]['pd_document_title'];
|
||||
echo '<td style="text-align:center;border:1px solid;"> <img src="' . $pd_images['common_images'][$i]['doc_url'] . '" height = "200" width="200" alt="' . $pd_images['common_images'][$i]['pd_document_title'] . '"/><br>' . $doc_title . '</td>';
|
||||
}
|
||||
|
||||
//unset($p_key);
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
?>
|
||||
<!-- ################# common images #################-->
|
||||
<!-- ########################### End-disclaimer start ######################################### -->
|
||||
<?php
|
||||
|
||||
echo "<p>";
|
||||
$footer_lender_stamp = MYUTIL::dispatchDisclaimer($lender_disclaimer, 3);
|
||||
if (isset($footer_lender_stamp)) {
|
||||
//$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer,3);
|
||||
echo '<p align="right"><img height="200" width="200" src="https://pdgenie.com/logo/stamps/' . $footer_lender_stamp['disclaimer'] . '" /></p>';
|
||||
}
|
||||
|
||||
$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 2);
|
||||
|
||||
if (isset($footer_lender_disclaimer)) {
|
||||
echo '<p align="center"><i>' . $footer_lender_disclaimer['disclaimer'] . '</i></p>';
|
||||
}
|
||||
echo "</p>";
|
||||
|
||||
|
||||
?>
|
||||
<!-- ########################### End disclaimer end ######################################### -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,657 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<style type="text/css">
|
||||
.page_break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
#page_break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
/*.page { width: 100%; height: 95%; }*/
|
||||
@page {
|
||||
margin: 100px 50px;
|
||||
/*font-family:Helvetica,Arial;*/
|
||||
font-family: Merriweather;
|
||||
}
|
||||
|
||||
header {
|
||||
position: fixed;
|
||||
top: -70px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: right;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: left;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
.non-editable {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
color: #e00201;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card Div Styles######### */
|
||||
#rcorners_green {
|
||||
background: #33cc33;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_red {
|
||||
background: red;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_light_green {
|
||||
background: #99ff66;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_amber {
|
||||
background: #ff9900;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card DIv Styles######### */
|
||||
|
||||
/* #########Score Card Table Styles######### */
|
||||
.scorecard_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table td,
|
||||
.scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: avoid;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.scorecard_table th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
page-break-inside: avoid;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
/* #########Score Card for personal assest section table getting overlapped ######### */
|
||||
|
||||
.scorecard_table_resonal_assest {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest td,
|
||||
.scorecard_table_resonal_assest th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
#first_div {
|
||||
width: 150px;
|
||||
height: 25px;
|
||||
border: 2px outset #000;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
/*padding-left: 20px;*/
|
||||
|
||||
}
|
||||
|
||||
#tick_div {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 100%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#tick_div_other {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 93%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS START ######### */
|
||||
#ini_table {
|
||||
table-layout: fixed;
|
||||
width: 80%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ini_table td {
|
||||
word-wrap: break-word;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function saveEdits(e) {
|
||||
|
||||
var editElem = document.getElementById("mydoc");
|
||||
var userVersion = editElem.innerHTML;
|
||||
//localStorage.removeItem('userEdits')
|
||||
//save the content to local storage
|
||||
localStorage.userEdits = userVersion;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
Powered by PD Genie™
|
||||
</footer>
|
||||
|
||||
<header>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png' /></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<!-- Wrap the content of your PDF inside a main tag -->
|
||||
<?php
|
||||
$main_applicant_name = $pd_master_details[0]['title_name'] . ' ' . $pd_master_details[0]['main_applicant'];
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$company_name = "";
|
||||
?>
|
||||
<?php
|
||||
echo "<br><br>";
|
||||
echo "<div>";
|
||||
echo "<h1><center>VISIT REPORT</center></h1> ";
|
||||
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
|
||||
echo "<h2><center>" . $main_applicant_name . "</center></h2>";
|
||||
echo "</div>";
|
||||
echo "<br><br><br><br>";
|
||||
?>
|
||||
|
||||
<table align="center" id="ini_table" border="0">
|
||||
<tbody>
|
||||
<?php
|
||||
echo '<tr><td>Visit Initiated Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['createdon'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['pd_visit_date'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Report Date </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['pd_report_generated_date'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Initiated by </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['lender_full_name'] . ' </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> Home Loan </td></tr>';
|
||||
echo '<tr><td>Customer Segment </td> <td style="width:2%;">:</td> <td> Salaried </td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<p></p>";
|
||||
|
||||
$header_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 1);
|
||||
if (isset($header_lender_disclaimer['disclaimer']) && $header_lender_disclaimer['disclaimer'] != '' && $header_lender_disclaimer['type'] == 1) {
|
||||
echo '<p align="justify"><i><strong>Disclaimer: </strong>' . $header_lender_disclaimer['disclaimer'] . '</i></p>';
|
||||
}
|
||||
|
||||
echo '<p align="justify"><i><strong>Registered / Corporate Office:</strong> SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002</i></p>';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- ####################### general information ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>GENERAL INFORMATION</u>: </h3>';
|
||||
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
|
||||
$value = $general_form['json'];
|
||||
$all_applicant_details = $applicants_details;
|
||||
if (strtoupper($value['is_person_met']) == 'YES') {
|
||||
echo '<p>' . 'Applicant <b>(' . $value['Name_of_the_Person_met_master'] . ')</b> was met at the visited address.' . '</p>';
|
||||
} else if (strtoupper($value['is_person_met']) == 'NO') {
|
||||
echo '<p>' . 'During PD (' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '</p>';
|
||||
}
|
||||
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
|
||||
echo '<p>' . $general_form['general_remark'] . '</p>';
|
||||
}
|
||||
?>
|
||||
<!-- ####################### general information ends ############################-->
|
||||
|
||||
<!-- ####################### address details ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
|
||||
$address_value = $address_form['json'];
|
||||
if (!empty($address_value)) {
|
||||
echo '<h3 contenteditable="true"><u>ADDRESS DETAILS</u>: </h3>';
|
||||
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
|
||||
echo '<p>' . '
|
||||
<b>Visit Initiated Address:</b> ' . $address_value['initiated_address'] . ' , ' . $address_value['city_master'] . ' , ' . $address_value['state_master'] . ' , ' . $address_value['pincode_master'] . '. </p>';
|
||||
}
|
||||
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'NO') {
|
||||
echo '<p>' . '
|
||||
<b>Address Where Visit is Initiated:</b> ' . $address_value['initiated_address'] . ' , ' . $address_value['city_master'] . ' , ' . $address_value['state_master'] . ' , ' . $address_value['pincode_master'] . '.
|
||||
<b>Address Where Visit was actually done:</b> ' . $address_value['actual_pd_address'] . ' , ' . $address_value['city2_master'] . ' , ' . $address_value['state2_master'] . ' , ' . $address_value['pincode2_master'] . '.
|
||||
<b>Reason for change in Visit address:</b> ' . $address_value['end_use'] . '.</p>';
|
||||
}
|
||||
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. </p>';
|
||||
}
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### address details ends ############################-->
|
||||
|
||||
<!-- ####################### office visit DI ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>VISIT DETAILS</u>: </h3>';
|
||||
$Office_visit_data = json_decode($pd_processed_forms[29][0]['processed_json'], true);
|
||||
$ov_value = $Office_visit_data['json'];
|
||||
|
||||
$company_name_sighted = strtoupper($ov_value['was_the_company_name_board_sighted']) == 'YES' ? 'seen' : 'not seen';
|
||||
$business_activities = strtoupper($ov_value['Was_any_business_activities_observed_during_visit']) == 'YES' ? 'seen' : 'not seen';
|
||||
$business_activities_during_visit = '';
|
||||
if (strtoupper($ov_value['Was_any_business_activities_observed_during_visit']) == 'YES') {
|
||||
$business_activities_during_visit = implode(', ', $ov_value['If_yes_choose_one']);
|
||||
$business_activities_during_visit = preg_replace("/_/i", ' ', $business_activities_during_visit);
|
||||
$business_activities_during_visit = ' and ' . ucwords($business_activities_during_visit);
|
||||
// if(isset($ov_value['Others_Please_specify'])){ $business_activities_during_visit = $business_activities_during_visit.'('.$ov_value['Others_Please_specify'].')'; }
|
||||
if (isset($ov_value['Others_Please_specify'])) {
|
||||
$business_activities_during_visit = str_replace("Others", $ov_value['Others_Please_specify'], $business_activities_during_visit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$year = (abs($ov_value['year']) >= 2) ? $ov_value['year'] . ' Years' : $ov_value['year'] . ' Year';
|
||||
$month = '';
|
||||
if ($ov_value['month'] > 0 && (!empty($ov_value['month'])) && isset($ov_value['month'])) {
|
||||
$month = (abs($ov_value['month']) >= 2) ? $ov_value['month'] . ' Months' : $ov_value['month'] . ' Month';
|
||||
$month = ' and ' . $month;
|
||||
}
|
||||
|
||||
$grosssal = '<span style="font-family: DejaVu Sans; sans-serif;font-size:10px;word-wrap:break-word">₹</span>' . ' ' . MYUTIL::customIndianNumberFormat($ov_value['gross_monthly_salary']) . '<span style="font-size:10px;">(' . MYUTIL::numtowords($ov_value['gross_monthly_salary']) . ')</span>';
|
||||
$netsal = '<span style="font-family: DejaVu Sans; sans-serif;font-size:10px;word-wrap:break-word">₹</span>' . ' ' . MYUTIL::customIndianNumberFormat($ov_value['net_monthly_salary']) . '<span style="font-size:10px;">(' . MYUTIL::numtowords($ov_value['net_monthly_salary']) . ')</span>';
|
||||
$document_seen = array();
|
||||
$document_not_seen = array();
|
||||
if (strtoupper($ov_value['salary_register_was_seen']) == 'YES') {
|
||||
array_push($document_seen, 'Salary Certificate');
|
||||
} else if (strtoupper($ov_value['salary_register_was_seen']) == 'NO' && isset($ov_value['Why_documents_are_not_available'])) {
|
||||
array_push($document_not_seen, $ov_value['Why_documents_are_not_available']);
|
||||
}
|
||||
if (strtoupper($ov_value['cash_voucher_was_seen']) == 'YES') {
|
||||
array_push($document_seen, 'Cash Voucher');
|
||||
} else if (strtoupper($ov_value['cash_voucher_was_seen']) == 'NO' && isset($ov_value['Why_documents_are_not_available_cash_voucher'])) {
|
||||
array_push($document_not_seen, $ov_value['Why_documents_are_not_available_cash_voucher']);
|
||||
}
|
||||
if (strtoupper($ov_value['salary_slip_was_seen']) == 'YES') {
|
||||
array_push($document_seen, 'Salary Slip');
|
||||
} else if (strtoupper($ov_value['salary_slip_was_seen']) == 'NO' && isset($ov_value['Why_documents_are_not_available_salary_slip'])) {
|
||||
array_push($document_not_seen, $ov_value['Why_documents_are_not_available_salary_slip']);
|
||||
}
|
||||
if (strtoupper($ov_value['offer_letter_was_seen']) == 'YES') {
|
||||
array_push($document_seen, 'Offer letter');
|
||||
} else if ($ov_value['offer_letter_was_seen'] == 'NO' && isset($ov_value['Why_documents_are_not_available_offer_letter'])) {
|
||||
array_push($document_not_seen, $ov_value['Why_documents_are_not_available_offer_letter']);
|
||||
}
|
||||
if (strtoupper($ov_value['others_Please_specifys']) == 'YES' && !empty($ov_value['Others_specify'])) {
|
||||
array_push($document_seen, $ov_value['Others_specify']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
echo '<ul><li style="margin: 15px 0;"><b>Employer Profile:</b> ' . $ov_value['employer_brief'] . '.</li>
|
||||
|
||||
<li style="margin: 15px 0;">The applicant has served <b> ' . $year . $month . '</b> as employee in this firm / company.</li>';
|
||||
|
||||
if (strtoupper($ov_value['salary_confirmed_by_person_met']) == 'YES') {
|
||||
echo '<li style="margin: 15px 0;">Applicant’s Salary confirmed has been confirmed by the person met. He gets monthly gross salary of
|
||||
' . $grosssal . ' and net monthly salary of ' . $netsal . '.</li> ';
|
||||
}
|
||||
if (strtoupper($ov_value['salary_confirmed_by_person_met']) == 'NO') {
|
||||
|
||||
echo '<li style="margin: 15px 0;">Applicant’s Salary <b> was not confirmed </b> by the person met.</li> ';
|
||||
}
|
||||
|
||||
echo '<li style="margin: 15px 0;">Applicant salary is getting paid Via <b>' . $ov_value['mode_of_getting_salary'] . '</b>.</li> ';
|
||||
echo '<li style="margin: 15px 0;">Employment Document Sighted: <b>' . implode('/', $document_seen) . '</b> were seen during Field visit and photographs of same is available in zipped file enclosed with report.</li> ';
|
||||
if (!empty($document_not_seen)) {
|
||||
echo '<li style="margin: 15px 0;">Documents were not sighted during visit because, <b>' . implode('/', $document_seen) . '</b></li> ';
|
||||
}
|
||||
echo '<li style="margin: 15px 0;">Officer Sighted ' . $ov_value['no_of_employees_sighted_by_PD_officer_during_visit'] . ' employees at the visited premises.';
|
||||
echo '<li style="margin: 15px 0;">The Business Name board was <b>' . $company_name_sighted . '</b> at the visited address.</li>
|
||||
<li style="margin: 15px 0;">Business Activity was <b>' . $business_activities . $business_activities_during_visit . '</b>.</li>';
|
||||
echo '</ul>';
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### office visit DI ends ############################-->
|
||||
|
||||
<!-- ################# credit manager specific query #################-->
|
||||
<?php
|
||||
|
||||
$credit_officier_specific_queries = array();
|
||||
if (isset($pd_processed_forms[31])) {
|
||||
$credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
|
||||
}
|
||||
// echo 'CREDIT ********************';
|
||||
// print_r($data['pd_processed_forms'][24]);
|
||||
//print_r($credit_officier_specific_queries);
|
||||
// if(count($credit_officier_specific_queries))
|
||||
// {
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>CREDIT MANAGER`S SPECIFIC QUERIES</u>:</h3>';
|
||||
//echo '<br>';
|
||||
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
|
||||
|
||||
|
||||
foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) {
|
||||
echo 'Question - ' . $value['question'] . '<br>';
|
||||
echo 'Answer - ' . $value['answer'];
|
||||
echo '<br><br>';
|
||||
}
|
||||
} else {
|
||||
echo 'There are no specific queries raised by Credit Manager.';
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>DOCUMENT TO BE PHOTOGRAPHED/SCANNED</u>: </h3>';
|
||||
//
|
||||
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
|
||||
|
||||
|
||||
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
|
||||
echo 'Document Required : ' . $doc_value['doc_name'] . '<br>';
|
||||
echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '<br>' : 'NO<br>');
|
||||
if ($doc_value['ans'] != 'yes') {
|
||||
echo 'Reason : ' . $doc_value['reason'];
|
||||
}
|
||||
echo '<br><br>';
|
||||
}
|
||||
} else {
|
||||
echo 'There are no specific documents to be collect.';
|
||||
}
|
||||
|
||||
if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) {
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true">Queries related to Covid-19: </h3>';
|
||||
|
||||
foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) {
|
||||
if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) {
|
||||
echo 'Question : ' . $covid_value['question'] . '<br>';
|
||||
$temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||||
|
||||
if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) {
|
||||
$temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')';
|
||||
}
|
||||
echo 'Answer : ' . $temp_answer . '<br>';
|
||||
$sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||||
if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) {
|
||||
echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '<br>';
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
?>
|
||||
|
||||
<!-- ################# credit manager specific query ends#################-->
|
||||
|
||||
<!-- ################# final remarks #################-->
|
||||
<div class="page_break"></div>
|
||||
<br>
|
||||
<h3 contenteditable="true"><u>VISITING OFFICER`S REMARKS</u></h3>
|
||||
<?php
|
||||
$final_remark = json_decode($pd_processed_forms[33][0]['processed_json'], true);
|
||||
$final_remark_data = $final_remark['json'];
|
||||
//print_r($final_remark_data);
|
||||
|
||||
|
||||
$positive = null;
|
||||
$negative = null;
|
||||
$refer_to_credit = null;
|
||||
$Could_not_verfiy = null;
|
||||
$fo_diplay = null;
|
||||
|
||||
if (isset($final_remark_data['final_status_of_visit'])) {
|
||||
if ($final_remark_data['final_status_of_visit'] == 'Couldnotverfiy') {
|
||||
$Could_not_verfiy = 1;
|
||||
$fo_diplay = "Could not verfiy";
|
||||
} else if ($final_remark_data['final_status_of_visit'] == 'Positive') {
|
||||
$positive = 1;
|
||||
$fo_diplay = "Positive";
|
||||
} else if ($final_remark_data['final_status_of_visit'] == 'Negative') {
|
||||
$negative = 1;
|
||||
$fo_diplay = "Negative";
|
||||
}
|
||||
}
|
||||
$pd_officer_final_remark = isset($final_remark_data['common_remarks']) ? $final_remark_data['common_remarks'] : '';
|
||||
|
||||
|
||||
?>
|
||||
<div>
|
||||
|
||||
<ul>
|
||||
<?php $tick_mark = '<span style="font-family: DejaVu Sans; sans-serif;font-size:12px">✔</span>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<li>Final Status of Field Visit: </li>
|
||||
<br><br>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="first_div" style="border-color:green;color:black;">Positive</div>
|
||||
<div id="tick_div" style="border-color:green;color:black;"><?php if ($positive) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
<td style="padding-left:50px;">
|
||||
<div id="first_div" style="border-color:red;color:black;">Negative</div>
|
||||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($negative) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
<td style="padding-left:50px;">
|
||||
<div id="first_div" style="border-color:#ffff00;color:black;">Could not verfiy</div>
|
||||
<div id="tick_div" style="border-color:#ffff00;color:black;"><?php if ($Could_not_verfiy) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<br>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Remarks:</li>
|
||||
<?php echo '<p style="text-align:justify;">' . $pd_officer_final_remark . '</p>' ?>
|
||||
</div>
|
||||
<!-- ################# final remarks ends #################-->
|
||||
<!-- ################# satellite #################-->
|
||||
<?php
|
||||
if (!empty($distances['distance'])) {
|
||||
echo '<br><br><b> Distance to PD location : </b>' . $distances['distance'];
|
||||
}
|
||||
echo '<br><br><b> GPS Coordinates of location where PD Visit was done : </b>' . $pd_master_details[0]['start_location'];
|
||||
echo '<br><br>';
|
||||
?>
|
||||
<?php
|
||||
$satellite_url = '';
|
||||
|
||||
if (isset($pd_images['common_images']) && count($pd_images['common_images'])) {
|
||||
foreach ($pd_images['common_images'] as $com_key => $com_value) {
|
||||
if ($com_value['pd_document_title'] == 'satellite') {
|
||||
$satellite_url = $com_value['doc_url'];
|
||||
unset($pd_images['common_images'][$com_key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<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>
|
||||
<!-- ################# satellite ends #################-->
|
||||
<!-- ################# common images #################-->
|
||||
|
||||
<?php
|
||||
// $filtered_arr = array_filter($pd_images['34'], function ($var) {
|
||||
// return ($var['isactive'] != 0);
|
||||
// });
|
||||
if (count($pd_images['34'])) {
|
||||
$pd_images['common_images'] = array_values($pd_images['34']);
|
||||
$tot_rows = ceil(count($pd_images['common_images']) / 2);
|
||||
echo '<div id="page_break"></div>';
|
||||
echo '<h3 contenteditable="true"><u>VISIT PICTURES</u></h3>';
|
||||
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
|
||||
|
||||
$add_factor = 0;
|
||||
for ($row = 0; $row < $tot_rows; $row++) {
|
||||
echo '<tr>';
|
||||
|
||||
$from = $row == 0 ? $row : ($row + $add_factor);
|
||||
$to = ($from + 2);
|
||||
$add_factor = $add_factor + 2;
|
||||
for ($i = $from; $i <= $to; $i++) {
|
||||
|
||||
if (isset($pd_images['common_images'][$i]) && ($pd_images['common_images'][$i]['pd_document_title'] != 'satellite')) {
|
||||
$doc_title = $pd_images['common_images'][$i]['pd_document_title'];
|
||||
echo '<td style="text-align:center;border:1px solid;"> <img src="' . $pd_images['common_images'][$i]['doc_url'] . '" height = "200" width="200" alt="' . $pd_images['common_images'][$i]['pd_document_title'] . '"/><br>' . $doc_title . '</td>';
|
||||
}
|
||||
|
||||
//unset($p_key);
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
?>
|
||||
<!-- ################# common images #################-->
|
||||
<!-- ########################### End-disclaimer start ######################################### -->
|
||||
<?php
|
||||
|
||||
echo "<p>";
|
||||
$footer_lender_stamp = MYUTIL::dispatchDisclaimer($lender_disclaimer, 3);
|
||||
if (isset($footer_lender_stamp)) {
|
||||
//$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer,3);
|
||||
echo '<p align="right"><img height="200" width="200" src="https://pdgenie.com/logo/stamps/' . $footer_lender_stamp['disclaimer'] . '" /></p>';
|
||||
}
|
||||
|
||||
$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 2);
|
||||
|
||||
if (isset($footer_lender_disclaimer)) {
|
||||
echo '<p align="center"><i>' . $footer_lender_disclaimer['disclaimer'] . '</i></p>';
|
||||
}
|
||||
echo "</p>";
|
||||
|
||||
|
||||
?>
|
||||
<!-- ########################### End disclaimer end ######################################### -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
708
api/application/views/report_templates/JSONTOREPORT_FI_RV.php
Normal file
708
api/application/views/report_templates/JSONTOREPORT_FI_RV.php
Normal file
@ -0,0 +1,708 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<style type="text/css">
|
||||
.page_break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
#page_break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
/*.page { width: 100%; height: 95%; }*/
|
||||
@page {
|
||||
margin: 100px 50px;
|
||||
/*font-family:Helvetica,Arial;*/
|
||||
font-family: Merriweather;
|
||||
}
|
||||
|
||||
header {
|
||||
position: fixed;
|
||||
top: -70px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: right;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: left;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
.non-editable {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
color: #e00201;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card Div Styles######### */
|
||||
#rcorners_green {
|
||||
background: #33cc33;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_red {
|
||||
background: red;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_light_green {
|
||||
background: #99ff66;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#rcorners_amber {
|
||||
background: #ff9900;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card DIv Styles######### */
|
||||
|
||||
/* #########Score Card Table Styles######### */
|
||||
.scorecard_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table td,
|
||||
.scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: avoid;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.scorecard_table th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
page-break-inside: avoid;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
/* #########Score Card for personal assest section table getting overlapped ######### */
|
||||
|
||||
.scorecard_table_resonal_assest {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest td,
|
||||
.scorecard_table_resonal_assest th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
#first_div {
|
||||
width: 150px;
|
||||
height: 25px;
|
||||
border: 2px outset #000;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
/*padding-left: 20px;*/
|
||||
|
||||
}
|
||||
|
||||
#tick_div {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 100%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#tick_div_other {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 93%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS START ######### */
|
||||
#ini_table {
|
||||
table-layout: fixed;
|
||||
width: 80%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ini_table td {
|
||||
word-wrap: break-word;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function saveEdits(e) {
|
||||
|
||||
var editElem = document.getElementById("mydoc");
|
||||
var userVersion = editElem.innerHTML;
|
||||
//localStorage.removeItem('userEdits')
|
||||
//save the content to local storage
|
||||
localStorage.userEdits = userVersion;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
Powered by PD Genie™
|
||||
</footer>
|
||||
|
||||
<header>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png' /></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<!-- Wrap the content of your PDF inside a main tag -->
|
||||
<?php
|
||||
$main_applicant_name = $pd_master_details[0]['title_name'] . ' ' . $pd_master_details[0]['main_applicant'];
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$company_name = "";
|
||||
?>
|
||||
<?php
|
||||
echo "<br><br>";
|
||||
echo "<div>";
|
||||
echo "<h1><center>VISIT REPORT</center></h1> ";
|
||||
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
|
||||
echo "<h2><center>" . $main_applicant_name . "</center></h2>";
|
||||
echo "</div>";
|
||||
echo "<br><br><br><br>";
|
||||
?>
|
||||
|
||||
<table align="center" id="ini_table" border="0">
|
||||
<tbody>
|
||||
<?php
|
||||
echo '<tr><td>Visit Initiated Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['createdon'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['pd_visit_date'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Report Date </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['pd_report_generated_date'] . '</td></tr>';
|
||||
echo '<tr><td>Visit Initiated by </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['lender_full_name'] . '</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> Home Loan </td></tr>';
|
||||
echo '<tr><td>Customer Segment </td> <td style="width:2%;">:</td> <td> Self Employed </td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<br><br>";
|
||||
echo "<p></p>";
|
||||
|
||||
$header_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 1);
|
||||
if (isset($header_lender_disclaimer['disclaimer']) && $header_lender_disclaimer['disclaimer'] != '' && $header_lender_disclaimer['type'] == 1) {
|
||||
echo '<p align="justify"><i><strong>Disclaimer: </strong>' . $header_lender_disclaimer['disclaimer'] . '</i></p>';
|
||||
}
|
||||
|
||||
echo '<p align="justify"><i><strong>Registered / Corporate Office:</strong> SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002</i></p>';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- ####################### general information ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>GENERAL INFORMATION</u>: </h3>';
|
||||
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
|
||||
$value = $general_form['json'];
|
||||
$all_applicant_details = $applicants_details;
|
||||
if (strtoupper($value['is_person_met']) == 'YES') {
|
||||
echo '<p>' . 'Applicant <b>(' . $value['Name_of_the_Person_met_master'] . ')</b> was met at the visited address.' . '</p>';
|
||||
} else if (strtoupper($value['is_person_met']) == 'NO') {
|
||||
echo '<p>' . '(' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '</p>';
|
||||
}
|
||||
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
|
||||
echo '<p>' . $general_form['general_remark'] . '</p>';
|
||||
}
|
||||
?>
|
||||
<!-- ####################### general information ends ############################-->
|
||||
|
||||
<!-- ####################### address details ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
|
||||
$address_value = $address_form['json'];
|
||||
if (!empty($address_value)) {
|
||||
echo '<h3 contenteditable="true"><u>ADDRESS DETAILS</u>: </h3>';
|
||||
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
|
||||
echo '<p>' . '
|
||||
<b>Visit Initiated Address:</b> ' . $address_value['initiated_address'] . ' , ' . $address_value['city_master'] . ' , ' . $address_value['state_master'] . ' , ' . $address_value['pincode_master'] . '. </p>';
|
||||
}
|
||||
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'NO') {
|
||||
echo '<p>' . '
|
||||
<b>Address Where Visit is Initiated:</b> ' . $address_value['initiated_address'] . ' , ' . $address_value['city_master'] . ' , ' . $address_value['state_master'] . ' , ' . $address_value['pincode_master'] . '.
|
||||
<br><b>Address Where Visit was actually done:</b> ' . $address_value['actual_pd_address'] . ' , ' . $address_value['city2_master'] . ' , ' . $address_value['state2_master'] . ' , ' . $address_value['pincode2_master'] . '.
|
||||
<br><b>Reason for change in Visit address:</b> ' . $address_value['end_use'] . '.</p>';
|
||||
}
|
||||
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. The <b>' . $address_value['address_type_master'] . '</b> is located in a <b>' . $address_value['locality_master'] . '</b> and the estimated area of the <b>' . $address_value['address_type_master'] . '</b> is <b>' . $address_value['uom_master'] . '</b>. The location was <b>' . $address_value['Approach_to_PD_location'] . '</b>. As Per Officer, the <b>' . $address_value['address_type_master'] . '</b> is situated in a <b>' . $address_value['comment_locality_master'] . '</b> Locality. ' . '</p>';
|
||||
}
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### address details ends ############################-->
|
||||
|
||||
<!-- ####################### office visit DI ############################-->
|
||||
<?php
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>VISIT DETAILS</u>: </h3>';
|
||||
|
||||
|
||||
$residence_visit_data = json_decode($pd_processed_forms[30][0]['processed_json'], true);
|
||||
$rv_value = $residence_visit_data['json'];
|
||||
|
||||
$year = (abs($rv_value['year']) >= 2) ? $rv_value['year'] . ' Years' : $rv_value['year'] . ' Year';
|
||||
$month = '';
|
||||
if ($rv_value['month'] > 0 && (!empty($rv_value['month'])) && isset($rv_value['month'])) {
|
||||
$month = (abs($rv_value['month']) >= 2) ? $rv_value['month'] . ' Months' : $rv_value['month'] . ' Month';
|
||||
$month = ' and ' . $month;
|
||||
}
|
||||
$type_of_proof = preg_replace("/_/i", ' ', $rv_value['type_of_proof']);
|
||||
$type_of_proof = ucwords($type_of_proof);
|
||||
|
||||
echo '<ul><li style="margin: 15px 0;">The Applicant is residing at the visited address for ' . $year . $month . '.</li>
|
||||
<li style="margin: 15px 0;">The Residence is <b>' . ucwords($rv_value['Visited_address_is_rented']) . '</b> by the applicant.</li>';
|
||||
|
||||
if (strtoupper($rv_value['address_proof_shared']) == 'YES') {
|
||||
echo '<li style="margin: 15px 0;"> Address Proof: <b>' . $type_of_proof . '</b> was shared during visit.</li>';
|
||||
}
|
||||
if (strtoupper($rv_value['address_proof_shared']) == 'NO') {
|
||||
echo '<li style="margin: 15px 0;"> Address Proof <b> was not shared </b> during visit.</li>';
|
||||
}
|
||||
// if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
|
||||
// echo '<li style="margin: 15px 0;">The <b>'.$ov_value['visited_address_is'].'</b> is <b>'.$ov_value['Visited_address_is_rented'].'</b>.</li>';
|
||||
// }
|
||||
echo '</ul>';
|
||||
?>
|
||||
<div id="page_break"></div>
|
||||
<!-- ####################### office visit DI ends ############################-->
|
||||
|
||||
<!-- ################# neighbourhood/reference check #################-->
|
||||
<?php
|
||||
|
||||
$pd_offiecer_status_about_neighbor = "";
|
||||
$neighbour_details = json_decode($pd_processed_forms[32][0]['processed_json'], true);
|
||||
$neighbour_value = $neighbour_details['json'];
|
||||
// print_r($neighbour_value);
|
||||
|
||||
// if(strcasecmp($neighbour_value['neighbourhood_status'],'Could Not Verify')){
|
||||
$pd_offiecer_status_about_neighbor = $neighbour_value['neighbourhood_status'];
|
||||
// }
|
||||
$neighbourhood_form_common_remarks = isset($neighbour_value['neighbourhood_remarks']) ? $neighbour_value['neighbourhood_remarks'] : null;
|
||||
?>
|
||||
<h3 contenteditable="true"><u>NEIGHBOURHOOD / REFERENCE CHECK</u></h3>
|
||||
<?php
|
||||
|
||||
//echo $pd_offiecer_status_about_neighbor;
|
||||
if (count($neighbour_value) > 0) {
|
||||
|
||||
$neighbourhood_name = 'Neighbour Check was done with ';
|
||||
$neighbourhood_name .= $neighbour_value['neighbourhood_name'] . '.';
|
||||
$neighbourhood_do_know = null;
|
||||
$neighbourhood_business_running_yr = null;
|
||||
$ownership = null;
|
||||
$neighbourhood_name_only = $neighbour_value['neighbourhood_name'];
|
||||
if (strtoupper($neighbour_value['do_know']) == 'YES') {
|
||||
$neighbourhood_do_know = $neighbour_value['neighbourhood_name'] . " knows about applicants and their business.";
|
||||
} else if (strtoupper($neighbour_value['do_know']) == 'NO') {
|
||||
$neighbourhood_do_know = $neighbour_value['neighbourhood_name'] . " did not know about the applicant or their business.";
|
||||
}
|
||||
if ($neighbour_value['how_long_do_know_in_year'] || $neighbour_value['how_long_do_know_in_month']) {
|
||||
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name'] . " confirmed that the business has been in operation for ";
|
||||
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_year'] == 1) ? $neighbour_value['how_long_do_know_in_year'] . " year" : (($neighbour_value['how_long_do_know_in_year'] > 1) ? $neighbour_value['how_long_do_know_in_year'] . " years" : "");
|
||||
$neighbour_value['how_long_do_know_in_year'] && $neighbour_value['how_long_do_know_in_month'] ? $neighbourhood_business_running_yr .= ' and ' : '';
|
||||
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_month'] == 1) ? $neighbour_value['how_long_do_know_in_month'] . " month" : (($neighbour_value['how_long_do_know_in_month'] > 1) ? $neighbour_value['how_long_do_know_in_month'] . " months" : "");
|
||||
$neighbourhood_business_running_yr .= '.';
|
||||
} else {
|
||||
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name'] . " was not aware of how long the business is in operation.";
|
||||
}
|
||||
$ownwers_list = '';
|
||||
if (isset($neighbour_value['know_organisation_owner']) && strtoupper($neighbour_value['know_organisation_owner']) == 'YES') {
|
||||
if (isset($neighbour_value['organisation_owner'])) {
|
||||
// echo "type" . gettype($neighbour_value['organisation_owner']);
|
||||
for ($i = 0; $i < count($neighbour_value['organisation_owner']); $i++) {
|
||||
$owner = $neighbour_value['organisation_owner'][$i];
|
||||
if ($owner != 0) {
|
||||
$title = MYUTIL::applicantTitleName($applicants_details, $owner);
|
||||
$ownwers_list .= $title . ' ' . APPLICANTNAME_GRABBER::getApplicantsNameById($owner, $applicants_details) . ' , ';
|
||||
} else {
|
||||
$ownwers_list .= ' ' . $neighbour_value['other_organisation_owner'] . ' , ';
|
||||
}
|
||||
}
|
||||
//echo $ownwers_list;
|
||||
//$ownwers_list = substr_replace($ownwers_list,'', strrpos(-$ownwers_list,','),1);
|
||||
//echo $ownwers_list;
|
||||
//echo $ownwers_list;echo "**********";
|
||||
|
||||
$ownwers_list = substr_replace($ownwers_list, '', strrpos($ownwers_list, ','), 1);
|
||||
if (strrpos($ownwers_list, ',')) {
|
||||
$ownwers_list = substr_replace($ownwers_list, ' and ', strrpos($ownwers_list, ','), 1);
|
||||
}
|
||||
|
||||
|
||||
$grammer1 = count($neighbour_value['organisation_owner']) > 1 ? ' are ' : ' is ';
|
||||
$grammer2 = count($neighbour_value['organisation_owner']) > 1 ? 'owners' : 'owner';
|
||||
$ownership = 'As per ' . $neighbour_value['neighbourhood_name'] . ' the ' . $grammer2 . ' of ' . $company_name . $grammer1 . $ownwers_list . '.';
|
||||
}
|
||||
} else {
|
||||
$ownership = $neighbour_value['neighbourhood_name'] . " was not aware of the business ownership.";
|
||||
}
|
||||
$existNeighRefCheck = array('neighbourhood_name_only' => $neighbourhood_name_only, 'neighbourhood_name' => $neighbourhood_name, 'neighbourhood_do_know' => $neighbourhood_do_know, 'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr, 'ownership' => $ownership);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (!empty($existNeighRefCheck)) {
|
||||
$nfValue = $existNeighRefCheck;
|
||||
echo $nfValue['neighbourhood_name_only'];
|
||||
?>
|
||||
|
||||
<ul>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
|
||||
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor; ?>.</span></li>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
} else { ?>
|
||||
<!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> -->
|
||||
<!-- <p>Neighbour Check was not possible due to Could not verify</p> -->
|
||||
<p>Status of the check: could not verify.</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($neighbourhood_form_common_remarks != "") {
|
||||
echo '<p>' . $neighbourhood_form_common_remarks . '</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- ################# neighbourhood/reference check ends #################-->
|
||||
|
||||
<!-- ################# credit manager specific query #################-->
|
||||
<?php
|
||||
$credit_officier_specific_queries = array();
|
||||
if (isset($pd_processed_forms[31])) {
|
||||
$credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
|
||||
}
|
||||
// echo 'CREDIT ********************';
|
||||
// print_r($data['pd_processed_forms'][24]);
|
||||
//print_r($credit_officier_specific_queries);
|
||||
// if(count($credit_officier_specific_queries))
|
||||
// {
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>CREDIT MANAGER`S SPECIFIC QUERIES</u>:</h3>';
|
||||
//echo '<br>';
|
||||
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
|
||||
foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) {
|
||||
echo 'Question - ' . $value['question'] . '<br>';
|
||||
echo 'Answer - ' . $value['answer'];
|
||||
echo '<br><br>';
|
||||
}
|
||||
} else {
|
||||
echo 'There are no specific queries raised by Credit Manager.';
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true"><u>DOCUMENT TO BE PHOTOGRAPHED/SCANNED</u>: </h3>';
|
||||
//
|
||||
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
|
||||
|
||||
|
||||
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
|
||||
echo 'Document Required : ' . $doc_value['doc_name'] . '<br>';
|
||||
echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '<br>' : 'NO<br>');
|
||||
if ($doc_value['ans'] != 'yes') {
|
||||
echo 'Reason : ' . $doc_value['reason'];
|
||||
}
|
||||
echo '<br><br>';
|
||||
}
|
||||
} else {
|
||||
echo 'There are no specific documents to be collect.';
|
||||
}
|
||||
|
||||
if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) {
|
||||
echo '<br>';
|
||||
echo '<h3 contenteditable="true">Queries related to Covid-19: </h3>';
|
||||
|
||||
foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) {
|
||||
if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) {
|
||||
echo 'Question : ' . $covid_value['question'] . '<br>';
|
||||
$temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||||
|
||||
if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) {
|
||||
$temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')';
|
||||
}
|
||||
echo 'Answer : ' . $temp_answer . '<br>';
|
||||
$sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||||
if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) {
|
||||
echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '<br>';
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
?>
|
||||
<!-- ################# credit manager specific query ends#################-->
|
||||
|
||||
<!-- ################# final remarks #################-->
|
||||
<div class="page_break"></div>
|
||||
<br>
|
||||
<h3 contenteditable="true"><u>VISITING OFFICER`S REMARKS</u></h3>
|
||||
<?php
|
||||
$final_remark = json_decode($pd_processed_forms[33][0]['processed_json'], true);
|
||||
$final_remark_data = $final_remark['json'];
|
||||
//print_r($final_remark_data);
|
||||
|
||||
|
||||
$positive = null;
|
||||
$negative = null;
|
||||
$refer_to_credit = null;
|
||||
$Could_not_verfiy = null;
|
||||
$fo_diplay = null;
|
||||
|
||||
if (isset($final_remark_data['final_status_of_visit'])) {
|
||||
if ($final_remark_data['final_status_of_visit'] == 'Couldnotverfiy') {
|
||||
$Could_not_verfiy = 1;
|
||||
$fo_diplay = "Could not verfiy";
|
||||
} else if ($final_remark_data['final_status_of_visit'] == 'Positive') {
|
||||
$positive = 1;
|
||||
$fo_diplay = "Positive";
|
||||
} else if ($final_remark_data['final_status_of_visit'] == 'Negative') {
|
||||
$negative = 1;
|
||||
$fo_diplay = "Negative";
|
||||
}
|
||||
}
|
||||
$pd_officer_final_remark = isset($final_remark_data['common_remarks']) ? $final_remark_data['common_remarks'] : '';
|
||||
|
||||
|
||||
?>
|
||||
<div>
|
||||
|
||||
<ul>
|
||||
<?php $tick_mark = '<span style="font-family: DejaVu Sans; sans-serif;font-size:12px">✔</span>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<li>Final Status of Field Visit: </li>
|
||||
<br><br>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="first_div" style="border-color:green;color:black;">Positive</div>
|
||||
<div id="tick_div" style="border-color:green;color:black;"><?php if ($positive) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
<td style="padding-left:50px;">
|
||||
<div id="first_div" style="border-color:red;color:black;">Negative</div>
|
||||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($negative) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
<td style="padding-left:50px;">
|
||||
<div id="first_div" style="border-color:#ffff00;color:black;">Could not verfiy</div>
|
||||
<div id="tick_div" style="border-color:#ffff00;color:black;"><?php if ($Could_not_verfiy) {
|
||||
echo $tick_mark;
|
||||
} ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<br>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Remarks:</li>
|
||||
<?php echo '<p style="text-align:justify;">' . $pd_officer_final_remark . '</p>' ?>
|
||||
</div>
|
||||
<!-- ################# final remarks ends #################-->
|
||||
<!-- ################# satellite #################-->
|
||||
<?php
|
||||
if (!empty($distances['distance'])) {
|
||||
echo '<br><br><b> Distance to PD location : </b>' . $distances['distance'];
|
||||
}
|
||||
echo '<br><br><b> GPS Coordinates of location where PD Visit was done : </b>' . $pd_master_details[0]['start_location'];
|
||||
echo '<br><br>';
|
||||
?>
|
||||
<?php
|
||||
$satellite_url = '';
|
||||
|
||||
if (isset($pd_images['common_images']) && count($pd_images['common_images'])) {
|
||||
foreach ($pd_images['common_images'] as $com_key => $com_value) {
|
||||
if ($com_value['pd_document_title'] == 'satellite') {
|
||||
$satellite_url = $com_value['doc_url'];
|
||||
unset($pd_images['common_images'][$com_key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<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>
|
||||
<!-- ################# satellite ends #################-->
|
||||
<?php
|
||||
// $filtered_arr = array_filter($pd_images['34'], function ($var) {
|
||||
// return ($var['isactive'] != 0);
|
||||
// });
|
||||
if (count($pd_images['34'])) {
|
||||
$pd_images['common_images'] = array_values($pd_images['34']);
|
||||
$tot_rows = ceil(count($pd_images['common_images']) / 2);
|
||||
echo '<div id="page_break"></div>';
|
||||
echo '<h3 contenteditable="true"><u>VISIT PICTURES</u></h3>';
|
||||
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
|
||||
|
||||
$add_factor = 0;
|
||||
for ($row = 0; $row < $tot_rows; $row++) {
|
||||
echo '<tr>';
|
||||
|
||||
$from = $row == 0 ? $row : ($row + $add_factor);
|
||||
$to = ($from + 2);
|
||||
$add_factor = $add_factor + 2;
|
||||
for ($i = $from; $i <= $to; $i++) {
|
||||
|
||||
if (isset($pd_images['common_images'][$i]) && ($pd_images['common_images'][$i]['pd_document_title'] != 'satellite')) {
|
||||
$doc_title = $pd_images['common_images'][$i]['pd_document_title'];
|
||||
echo '<td style="text-align:center;border:1px solid;"> <img src="' . $pd_images['common_images'][$i]['doc_url'] . '" height = "200" width="200" alt="' . $pd_images['common_images'][$i]['pd_document_title'] . '"/><br>' . $doc_title . '</td>';
|
||||
}
|
||||
|
||||
//unset($p_key);
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
?>
|
||||
<!-- ################# common images #################-->
|
||||
<!-- ########################### End-disclaimer start ######################################### -->
|
||||
<?php
|
||||
|
||||
echo "<p>";
|
||||
$footer_lender_stamp = MYUTIL::dispatchDisclaimer($lender_disclaimer, 3);
|
||||
if (isset($footer_lender_stamp)) {
|
||||
//$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer,3);
|
||||
echo '<p align="right"><img height="200" width="200" src="https://pdgenie.com/logo/stamps/' . $footer_lender_stamp['disclaimer'] . '" /></p>';
|
||||
}
|
||||
|
||||
$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 2);
|
||||
|
||||
if (isset($footer_lender_disclaimer)) {
|
||||
echo '<p align="center"><i>' . $footer_lender_disclaimer['disclaimer'] . '</i></p>';
|
||||
}
|
||||
echo "</p>";
|
||||
|
||||
|
||||
?>
|
||||
<!-- ########################### End disclaimer end ######################################### -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -4,7 +4,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -466,7 +466,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -592,6 +595,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
|
||||
@ -605,6 +609,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -673,31 +684,78 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$faceimage_url = array();
|
||||
for ($i = 0; $i < count($all_applicant_details); $i++) {
|
||||
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
|
||||
$faceimage_url = $com_value['doc_url'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
for ($i = 0; $i < count($faceimage_url); $i++) {
|
||||
echo ' ';
|
||||
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -878,6 +936,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
|
||||
@ -4,7 +4,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -466,7 +466,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -592,6 +595,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
|
||||
@ -605,6 +609,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -673,31 +684,76 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$faceimage_url = array();
|
||||
for ($i = 0; $i < count($all_applicant_details); $i++) {
|
||||
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
|
||||
$faceimage_url = $com_value['doc_url'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
for ($i = 0; $i < count($faceimage_url); $i++) {
|
||||
echo ' ';
|
||||
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
@ -878,6 +934,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
|
||||
@ -4,7 +4,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -466,7 +466,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -593,6 +596,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
|
||||
@ -606,6 +610,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -674,32 +685,77 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
$faceimage_url = array();
|
||||
for ($i = 0; $i < count($all_applicant_details); $i++) {
|
||||
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
|
||||
$faceimage_url = $com_value['doc_url'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
for ($i = 0; $i < count($faceimage_url); $i++) {
|
||||
echo ' ';
|
||||
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
<table class="scorecard_table">
|
||||
|
||||
@ -877,6 +933,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
|
||||
@ -4,7 +4,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -465,7 +465,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -590,6 +593,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
|
||||
@ -603,6 +607,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -682,24 +693,62 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
//echo '</div>';
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
$faceimage_url = array();
|
||||
for ($i = 0; $i < count($all_applicant_details); $i++) {
|
||||
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
|
||||
$faceimage_url = $com_value['doc_url'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
for ($i = 0; $i < count($faceimage_url); $i++) {
|
||||
echo ' ';
|
||||
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- <br> -->
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
@ -882,6 +931,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];
|
||||
|
||||
@ -4,7 +4,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -472,7 +472,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
font-size: 14px;
|
||||
font-weight: bolder;;
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -597,6 +600,7 @@ font-weight: bolder;;
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
|
||||
@ -610,6 +614,13 @@ font-weight: bolder;;
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -682,6 +693,12 @@ font-weight: bolder;;
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
@ -689,23 +706,65 @@ font-weight: bolder;;
|
||||
}
|
||||
//echo '</div>';
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$faceimage_url = array();
|
||||
for ($i = 0; $i < count($all_applicant_details); $i++) {
|
||||
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
|
||||
$faceimage_url = $com_value['doc_url'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
for ($i = 0; $i < count($faceimage_url); $i++) {
|
||||
echo ' ';
|
||||
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
echo '<br>';
|
||||
?>
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- <br> -->
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
@ -465,7 +465,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
.facecrop { box-sizing: border-box; }
|
||||
.facecrop_row { display: flex; }
|
||||
/* Create three equal columns that sits next to each other */
|
||||
.facecrop_column { flex: 33.33%; padding: 5px;}
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
@ -591,6 +594,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['name'] = $individual['applicant_title_name_master'] .' '. $applicant_name;
|
||||
$temp_person_met['photo'] = '';
|
||||
$temp_person_met['id_proof'] = '';
|
||||
$temp_person_met['face_compare'] = '';
|
||||
foreach($pd_images[18] as $pm_Key => $pm_value)
|
||||
{
|
||||
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
|
||||
@ -604,6 +608,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$temp_person_met['id_proof'] = $pm_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
|
||||
if($com_value['image_key'] == 'face_mark' && $com_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
|
||||
$temp_person_met['face_compare'] = $com_value['doc_url'] ;
|
||||
}
|
||||
}
|
||||
$company_relationship_data = null;
|
||||
foreach($general_form['company_with_relationships'] as $company_with_relationship)
|
||||
{
|
||||
@ -676,31 +687,77 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
if($person['face_compare'])
|
||||
{
|
||||
echo ' ';
|
||||
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
|
||||
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
$faceimage_url = '';
|
||||
// if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['facemark_image_generated'] == 1 && $pd_master_details[0]['is_face_api_enabled'] == 1)
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'face_api_result_image')
|
||||
{
|
||||
$faceimage_url = $com_value['doc_url'];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
echo '<img src="'.$faceimage_url.'" width="300" height="200" alt=""/>';
|
||||
$faceimage_url = array();
|
||||
for ($i = 0; $i < count($all_applicant_details); $i++) {
|
||||
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
|
||||
$faceimage_url = $com_value['doc_url'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!empty($faceimage_url)){
|
||||
for ($i = 0; $i < count($faceimage_url); $i++) {
|
||||
echo ' ';
|
||||
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(!empty($facecrop)){
|
||||
for ($fc = 0; $fc < count($facecrop); $fc++) {
|
||||
$fc_arr = $facecrop[$fc];
|
||||
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ;
|
||||
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array();
|
||||
|
||||
// ########################### Percentage Bar Section #########################################
|
||||
echo "<h3>Face Comparison</h3>" ;
|
||||
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
|
||||
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
|
||||
for ($i = 0; $i < count($ci); $i++) {
|
||||
$similarity = round($ci[$i]["Similarity"]);
|
||||
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>';
|
||||
if ($similarity > 80) { // above 81 green
|
||||
$progress_bar_class = 'rcorners_green';
|
||||
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
|
||||
$progress_bar_class = 'rcorners_amber';
|
||||
} else if ($similarity <= 60) { // below 60 red
|
||||
$progress_bar_class = 'rcorners_red';
|
||||
}
|
||||
echo '<div class="facecrop_row facecrop">
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">
|
||||
</div>
|
||||
<div class="facecrop_column">'.$symbol.'</div>
|
||||
<div class="facecrop_column">
|
||||
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
|
||||
<span style="float: left;">Similarity</span>
|
||||
<span style="float: right;">'.$similarity.' %</span>
|
||||
<div style="clear:both;"></div>
|
||||
</div>';
|
||||
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
|
||||
|
||||
}
|
||||
// ########################### End of Percentage Bar Section #########################################
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- <br> -->
|
||||
|
||||
<p contenteditable="true"><b>Loan Applicants:</b></p>
|
||||
@ -881,6 +938,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
// if($com_value['image_key'] == 'face_mark'){ array_push($faceimage_url,$com_value['doc_url']);}
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];
|
||||
|
||||
557
api/application/views/report_templates/PDSMCIMG_PDF.php
Normal file
557
api/application/views/report_templates/PDSMCIMG_PDF.php
Normal file
@ -0,0 +1,557 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/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 { width: 100%; height: 95%; }*/
|
||||
@page {
|
||||
margin: 100px 50px;
|
||||
/*font-family:Helvetica,Arial;*/
|
||||
font-family:Merriweather;
|
||||
}
|
||||
header {
|
||||
position: fixed;
|
||||
top: -70px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: right;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: left;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
.non-editable{ background-color:#99ff99; }
|
||||
|
||||
.table2 {
|
||||
border: 1px solid black;
|
||||
width: 100%;
|
||||
}
|
||||
.table2 td {
|
||||
border: 1px solid black;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.table2 th {
|
||||
border: 1px solid black;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.table2 {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
tfoot{
|
||||
color:#e00201;
|
||||
}
|
||||
|
||||
.simpletable, .simpletable th, .simpletable td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* ######### Mini Score Card Table Styles######### */
|
||||
|
||||
.mini_scorecard_table {
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.mini_scorecard_table td, .mini_scorecard_table th {
|
||||
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.mini_scorecard_table th {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;page-break-inside: avoid;
|
||||
|
||||
}
|
||||
/* #########End of Mini Score Card Table Styles######### */
|
||||
|
||||
|
||||
/* #########End of Mini Score Card Div Styles######### */
|
||||
#rcorners_green {
|
||||
|
||||
background: #33cc33;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
#rcorners_red {
|
||||
|
||||
background: red;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
#rcorners_light_green {
|
||||
|
||||
background: #99ff66;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
#rcorners_amber{
|
||||
|
||||
background: #ff9900;
|
||||
padding: 3px;
|
||||
width: 75px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/* #########End of Mini Score Card DIv Styles######### */
|
||||
|
||||
|
||||
|
||||
|
||||
/* #########Score Card Table Styles######### */
|
||||
|
||||
.scorecard_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table td, .scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: avoid;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: avoid; }
|
||||
|
||||
.scorecard_table tr:hover {background-color: #ddd;}
|
||||
|
||||
.scorecard_table th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;page-break-inside: avoid;
|
||||
|
||||
}
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
/* #########Score Card for personal assest section table getting overlapped ######### */
|
||||
|
||||
.scorecard_table_resonal_assest {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest td, .scorecard_table_resonal_assest th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table_resonal_assest tr:nth-child(even){background-color: #f2f2f2; }
|
||||
|
||||
.scorecard_table_resonal_assest tr:hover {background-color: #ddd;}
|
||||
|
||||
.scorecard_table_resonal_assest th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
|
||||
}
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
/* #########Score Card2 Table Styles######### */
|
||||
|
||||
.scorecard_table2 {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table2 td, .scorecard_table2 th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table2 tr:nth-child(even){background-color: #f2f2f2;}
|
||||
|
||||
.scorecard_table2 tr:hover {background-color: #ddd;}
|
||||
|
||||
.scorecard_table2 th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
|
||||
}
|
||||
/* #########End of Score Card2 Table Styles######### */
|
||||
|
||||
|
||||
.customth { width: 10%; }
|
||||
|
||||
/* #########billwise Table Styles######### */
|
||||
.customtd { text-align:center; }
|
||||
.customtd_leftalign { text-align:left; }
|
||||
.customtd_rightalign { text-align:right; }
|
||||
|
||||
.billwise_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: auto;
|
||||
|
||||
}
|
||||
|
||||
.billwise_table td, .billwise_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 4px;
|
||||
|
||||
}
|
||||
|
||||
.billwise_table tr:nth-child(even){background-color: #f2f2f2;}
|
||||
|
||||
.billwise_table tr:hover {background-color: #ddd;}
|
||||
|
||||
.billwise_table th {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
}
|
||||
/* #########billwise Table Styles######### */
|
||||
|
||||
|
||||
/* #########Annexure table ######### */
|
||||
|
||||
.annexure_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: auto;
|
||||
|
||||
}
|
||||
|
||||
.annexure_table td, .annexure_table th {
|
||||
border: 1px solid #000;
|
||||
|
||||
}
|
||||
|
||||
.annexure_table tr:nth-child(even){background-color: #f2f2f2;}
|
||||
|
||||
.annexure_table tr:hover {background-color: #ddd;}
|
||||
|
||||
.annexure_table th {
|
||||
/*padding-top: 4px;*/
|
||||
/*padding-bottom: 4px;*/
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
}
|
||||
/* #########Annexure######### */
|
||||
|
||||
|
||||
.customtd { text-align:center; }
|
||||
.customtd_leftalign { text-align:left; }
|
||||
.customtd_rightalign { text-align:right; }
|
||||
|
||||
|
||||
#boxstyle1 {
|
||||
box-sizing: border-box;
|
||||
width: 60px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
border: 2px outset black;
|
||||
}
|
||||
#boxstyle2 {
|
||||
box-sizing: border-box;
|
||||
width: 200px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
border: 2px outset black;
|
||||
text-align:center;
|
||||
}
|
||||
#boxstyle3 {
|
||||
box-sizing: border-box;
|
||||
width: 120px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
border: 2px outset black;
|
||||
}
|
||||
|
||||
#billwise {
|
||||
box-sizing: content-box;
|
||||
/*disply:inline;*/
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
border: 1px solid #0191ed;
|
||||
}
|
||||
|
||||
#first_div {
|
||||
width: 150px;
|
||||
height: 25px;
|
||||
border: 2px outset #000;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
border-color:red;
|
||||
color:red;
|
||||
/*padding-left: 20px;*/
|
||||
|
||||
}
|
||||
#tick_div {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 100%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color:red;
|
||||
color:red;
|
||||
}
|
||||
#tick_div_other {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
margin-left: 93%;
|
||||
margin-top: -29px;
|
||||
border: 2px outset #000;
|
||||
text-align: center;
|
||||
border-color:red;
|
||||
color:red;
|
||||
}
|
||||
|
||||
|
||||
/* #########Person met card css######### */
|
||||
.chip {
|
||||
|
||||
padding: 0 25px;
|
||||
height: 100px;
|
||||
width: 600px;
|
||||
font-size: 14px;
|
||||
|
||||
border-radius: 50px;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.chip #img1 {
|
||||
float: left;
|
||||
margin: 0 10px 0 -25px;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.chip #img2 {
|
||||
float: right;
|
||||
margin: 0 -25px 0px -125px;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* #########Person met card css######### */
|
||||
|
||||
|
||||
/* #########Doc sighted gallary css######### ;*/
|
||||
|
||||
.gallery {
|
||||
margin: 5px;
|
||||
border: 1px solid #ccc;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.gallery:hover {
|
||||
border: 1px solid #777;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.desc {
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
color:green
|
||||
}
|
||||
|
||||
/* #########Doc sighted gallary css######### */
|
||||
|
||||
/* ######### TOOLTIP CSS START ######### */
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: inline;
|
||||
border-bottom: 1px dotted black;
|
||||
}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 120px;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#ini_table{
|
||||
table-layout: fixed;
|
||||
width:80%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ini_table td{
|
||||
word-wrap:break-word
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.intelligence{
|
||||
/*background-color: lightgrey;*/
|
||||
width: auto;
|
||||
border: 5px solid #0191ed;
|
||||
padding: 5px;
|
||||
/*margin: 10px;*/
|
||||
}
|
||||
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function saveEdits(e)
|
||||
{
|
||||
|
||||
var editElem = document.getElementById("mydoc");
|
||||
var userVersion = editElem.innerHTML;
|
||||
//localStorage.removeItem('userEdits')
|
||||
//save the content to local storage
|
||||
localStorage.userEdits = userVersion;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
|
||||
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
Powered by PDGenie
|
||||
</footer>
|
||||
<header>
|
||||
|
||||
<div><img style="width:50px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
//$all_pd_images_count = count($all_pd_images);
|
||||
|
||||
$img_row_count = ceil(count($all_pd_images) / 3);
|
||||
if(count($all_pd_images)){
|
||||
echo '<br>';
|
||||
echo '<p>PD Photograph`s :</p>';
|
||||
echo '<br>';
|
||||
echo '<table border="1" height="100%" width="50%">';
|
||||
$add_factor = 0;
|
||||
for($img_row = 0; $img_row < $img_row_count; $img_row++)
|
||||
{
|
||||
//if($img_row > 0) { break; }
|
||||
echo '<tr>';
|
||||
$from = $img_row == 0 ? $img_row : ($img_row+$add_factor);
|
||||
$to = ($from + 2);
|
||||
$add_factor = $add_factor + 2;
|
||||
for($photo_iter = $from; $photo_iter <= $to;$photo_iter++)
|
||||
{
|
||||
|
||||
if(isset($all_pd_images[$photo_iter]))
|
||||
{
|
||||
echo '<td>';
|
||||
echo '<div class="gallery">';
|
||||
|
||||
if($all_pd_images[$photo_iter]['img_name'] == "satellite"){
|
||||
$satellite = 'data:image/gif;base64,'.$all_pd_images[$photo_iter]['img'];
|
||||
echo '<img src = "'.$satellite.'" alt = "PD Visted Location Satellite Image " width="200" height="200">';
|
||||
}else{
|
||||
echo '<img src="'.$all_pd_images[$photo_iter]['img'].'" alt="" width="200" height="200">';
|
||||
}
|
||||
|
||||
echo '<div class="desc">'.$all_pd_images[$photo_iter]['img_name'] .'</div>';
|
||||
echo '</div>';
|
||||
echo '</td>';
|
||||
// unset($all_pd_images[$photo_iter]);
|
||||
}
|
||||
|
||||
}
|
||||
//echo "<br><br><hr>";
|
||||
echo '</tr>';
|
||||
}
|
||||
//echo '</tbody>';
|
||||
echo '</table>';
|
||||
}
|
||||
//
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
//
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
142
api/application/views/report_templates/dsc_progress.php
Normal file
142
api/application/views/report_templates/dsc_progress.php
Normal file
@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
/* ######### TOOLTIP CSS END ######### */
|
||||
.PB-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.PB-skill h3 {
|
||||
font-weight: 400;
|
||||
letter-spacing: 1px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 5px;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.PB-progress-bar {
|
||||
width: 600px;
|
||||
height: 10px;
|
||||
background: #959595;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.PB-progress-bar div {
|
||||
width: 0%;
|
||||
height: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.PB-progress-bar span {
|
||||
width: 41px;
|
||||
height: 41px;
|
||||
background: #FFF;
|
||||
border-radius: 50%;
|
||||
float: right;
|
||||
margin-top: -15px;
|
||||
margin-right: -20px;
|
||||
color: #333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.PB-html {
|
||||
background: #0191ed;
|
||||
animation: PB-html 1s linear forwards
|
||||
}
|
||||
|
||||
.PB-html span {
|
||||
border: 1px solid #e91e63;
|
||||
}
|
||||
|
||||
@keyframes PB-html {
|
||||
100% {
|
||||
width: 86%;
|
||||
}
|
||||
}
|
||||
.PB-red {
|
||||
background: #e00201;
|
||||
animation: PB-red 1s linear forwards
|
||||
}
|
||||
|
||||
.PB-red span {
|
||||
border: 1px solid #e00201;
|
||||
}
|
||||
|
||||
@keyframes PB-red {
|
||||
100% {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
.PB-green {
|
||||
background: #33cc33;
|
||||
|
||||
animation: PB-green 1s linear forwards
|
||||
}
|
||||
|
||||
.PB-green span {
|
||||
border: 1px solid #33cc33;
|
||||
}
|
||||
|
||||
@keyframes PB-green {
|
||||
100% {
|
||||
width: 55%;
|
||||
}
|
||||
}
|
||||
.PB-orange {
|
||||
background: #ff9900;
|
||||
animation: PB-orange 1s linear forwards
|
||||
}
|
||||
|
||||
.PB-orange span {
|
||||
border: 1px solid #ff9900;
|
||||
}
|
||||
|
||||
@keyframes PB-orange {
|
||||
100% {
|
||||
width: 67%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="PB-container">
|
||||
<div class="PB-skills">
|
||||
<h3>Similarty</h3>
|
||||
<div class="PB-progress-bar">
|
||||
<div class="PB-red">
|
||||
<span>70%</span>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Similarty</h3>
|
||||
<div class="PB-progress-bar">
|
||||
<div class="PB-green">
|
||||
<span>55%</span>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Similarty</h3>
|
||||
<div class="PB-progress-bar">
|
||||
<div class="PB-orange">
|
||||
<span>67%</span>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Similarty</h3>
|
||||
<div class="PB-progress-bar">
|
||||
<div class="PB-html">
|
||||
<span>37</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
434
api/application/views/sale_pd_templates/FHFSL.php
Normal file
434
api/application/views/sale_pd_templates/FHFSL.php
Normal file
@ -0,0 +1,434 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$uparrow = '<span style="color:green;">↑</span>';
|
||||
$downarrow = '<span style="color:red;">↓</span>';
|
||||
$dash = '<span style="color:black;"> </span>';
|
||||
$product_abbr = $master[0]['abbr'];
|
||||
$product = $master[0]['name'];
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$title = "";
|
||||
if($section1['verification_type'] == "Office verification" || $section1['verification_type'] == "Workplace verification"){$title = "Workplace FI for ".$product; }
|
||||
else if($section1['verification_type'] == "Residence verification"){$title = "Residence FI for ".$product;}
|
||||
$smc_emp_code = $master[0]['smc_emp_code'];
|
||||
$residence_ownership_arr = array("self_owned" => "Self-Owned","parental"=>"Parental","family_owned"=>"Family Owned","rented"=>"Rented");
|
||||
$residence_yr_arr = array("0"=>"< 1 yr","1"=>"1-2 yrs","2"=>"2 to 5 yrs","3"=>"> 5 yrs");
|
||||
$occupation_arr = array("0"=>"Salaried","1"=>"SENP","2"=>"SEP");
|
||||
$constitution_arr = array("0"=>"Ltd","1"=>"Pvt","2"=>"Ltd","3"=>"Trust/Society","4"=>"Partnership/LLP","5"=>"Proprietorship");
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||||
<style type="text/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 { width: 100%; height: 95%; }*/
|
||||
@page {
|
||||
margin: 100px 50px;
|
||||
/*font-family:Helvetica,Arial;*/
|
||||
font-family:Merriweather;
|
||||
}
|
||||
header {
|
||||
position: fixed;
|
||||
top: -70px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: right;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
|
||||
/** Extra personal styles **/
|
||||
/*background-color: #03a9f4;
|
||||
color: white;*/
|
||||
text-align: left;
|
||||
/*line-height: 35px;*/
|
||||
}
|
||||
|
||||
|
||||
/* #########Score Card Table Styles######### */
|
||||
|
||||
.scorecard_table {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: inline;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table td, .scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: inline;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: inline; }
|
||||
|
||||
.scorecard_table tr:hover {background-color: #ddd;}
|
||||
|
||||
.scorecard_table th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0d93a9;
|
||||
color: white;page-break-inside: inline;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card Table Styles######### */
|
||||
|
||||
|
||||
/* #########Score Card2 Table Styles######### */
|
||||
|
||||
.scorecard_table2 {
|
||||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table2 td, .scorecard_table2 th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: avoid;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table2 tr:nth-child(even){background-color: #f2f2f2;page-break-inside: avoid; }
|
||||
|
||||
.scorecard_table2 tr:hover {background-color: #ddd;}
|
||||
|
||||
.scorecard_table2 th {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
text-align: center;
|
||||
background-color: #0d93a9;
|
||||
color: white;page-break-inside: avoid;
|
||||
|
||||
}
|
||||
|
||||
/* #########End of Score Card 2 Table Styles######### */
|
||||
|
||||
.tdcenteralign{ text-align: center; }
|
||||
.thlargefont{ font-size: 20px; }
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
|
||||
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
<img style="width:100px;height:50px;opacity: 0.5;padding-top: 5px;" src='https://pdgenie.com/logo/sineedge_red.png'/> Powered By PD Genie
|
||||
</footer>
|
||||
<header>
|
||||
<div>
|
||||
<img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png'/>
|
||||
</div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<table class="scorecard_table">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10" ><?php echo $title; ?> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_name_master']) ? $section1['lender_name_master'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Branch</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['branch_master']) ? $section1['branch_master'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Application ID</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['loan_application_id']) ? $section1['loan_application_id'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender Sales Person</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_sales_person_master']) ? $section1['lender_sales_person_master'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender Credit Person</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_credit_person_master']) ? $section1['lender_credit_person_master'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Product Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['product_name_master']) ? $section1['product_name_master'] : (isset($master[0]['name'])? $master[0]['name'] : 'Not Provided')?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['loan_amount']) ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount']) : 'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Applicant Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['applicant_name']) ? $section1['applicant_name'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Applicant Mobile Number</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['applicant_mobile_no']) ? $section1['applicant_mobile_no'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Verification Type</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['verification_type']) ? $section1['verification_type'] : 'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<?php if(isset($section1['verification_type']) && $section1['verification_type'] == "Residence verification"){ ?>
|
||||
<table class="scorecard_table">
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Residence Details</th>
|
||||
</tr>
|
||||
<?php if(isset($section1['residence_details'])){
|
||||
$rd_data = $section1['residence_details'];
|
||||
for($i = 0; $i < count($rd_data); $i++){?>
|
||||
<tr>
|
||||
<td colspan="3"><?php echo ($i+1)." . "; ?>Address Details</td>
|
||||
<td class = "tdcenteralign" colspan="7"><?php if(isset($rd_data[$i]['residence_address'])){ echo $rd_data[$i]['residence_address']; }else{ echo 'Not Provided'; }?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($rd_data[$i]['residence_city_master'])?$rd_data[$i]['residence_city_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2">State</td>
|
||||
<td class = "tdcenteralign" colspan="1"><?php echo isset($rd_data[$i]['residence_state_master'])?$rd_data[$i]['residence_state_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2">PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($rd_data[$i]['residence_pincode_master']) ?$rd_data[$i]['residence_pincode_master']: 'Not Provided';?></td>
|
||||
</tr>
|
||||
<?php } }?>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Residence Ownership</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['residence_ownership']) ? $residence_ownership_arr[$section1['residence_ownership']] :'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Years at Current Residence</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_residence']) ? $section1['years_at_current_residence'] : 'Not Provided' ; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Permanent Address Same as Current Residence Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_residence_address'])?$section1['Same_as_current_residence_address']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<?php if(isset($section1['Same_as_current_residence_address']) && $section1['Same_as_current_residence_address'] == 'No'){?>
|
||||
<tr>
|
||||
<td colspan="3">Permanent Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['permanent_address'])?$section1['permanent_address']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['permanent_city_master'])?$section1['permanent_city_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >State</td>
|
||||
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['permanent_state_master'])?$section1['permanent_state_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['permanent_pincode_master'])?$section1['permanent_pincode_master']:'Not Provided'; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td colspan="3"> Number of Earning Family Member</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['number_of_earning_family_member'])?$section1['number_of_earning_family_member']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Number of Dependents</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['number_of_dependents'])?$section1['number_of_dependents']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php }?>
|
||||
<?php if(isset($section1['verification_type']) && $section1['verification_type'] == "Office verification"){ ?>
|
||||
<table class="scorecard_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Office Details</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Address Details</td>
|
||||
<td class = "tdcenteralign" colspan="7"><?php if(isset($section1['officer_address'])){ echo $section1['officer_address']; }else{ echo 'Not Provided'; }?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['officer_city_master'])?$section1['officer_city_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >State</td>
|
||||
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['officer_state_master'])?$section1['officer_state_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['officer_pincode_master'])?$section1['officer_pincode_master']:'Not Provided'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Occupation of the Loan Applicant</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['occupation_of_the_loan_applicant'])?$occupation_arr[$section1['occupation_of_the_loan_applicant']]:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Employer/Business Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['employer_business_name'])?$section1['employer_business_name']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="3">Same as Current Business Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_business_address'])?$section1['Same_as_current_business_address']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<?php if(isset($section1['Same_as_current_business_address']) && $section1['Same_as_current_business_address'] == 'No'){?>
|
||||
<tr>
|
||||
<td colspan="3">Employer/Business Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['business_address'])?$section1['business_address']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<!-- <?php // if($section1['employer_business_address'] == 0){ ?> -->
|
||||
<!-- <tr>
|
||||
<td colspan="3">Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_address'];?></td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['business_city_master'])?$section1['business_city_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >State</td>
|
||||
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['business_state_master'])?$section1['business_state_master']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['business_pincode_master'])?$section1['business_pincode_master']:'Not Provided'; ?></td>
|
||||
</tr>
|
||||
<?php } ?> -->
|
||||
<tr>
|
||||
<td colspan="3"> Constitution of Employer /Business </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['constitution_of_employer_business_applicant']) ? $constitution_arr[$section1['constitution_of_employer_business_applicant']] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Years at Current employment/Business</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_employment_business'])?$section1['years_at_current_employment_business']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Total Work Experience (in Years) </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['total_work_experience'])?$section1['total_work_experience']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Net Monthly Salary/ Net Income (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['net_monthly_salary_net_income'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['net_monthly_salary_net_income']):'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<br>
|
||||
<div id="page_break"></div>
|
||||
<table class="scorecard_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Additional Questions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Name of Student</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['name_of_student'])?$section1['name_of_student']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Relationship with Applicant</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['relationship_with_applicant_master'])?$section1['relationship_with_applicant_master']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Educational Institute Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_name'])?$section1['educational_institute_name']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Educational Institute Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_address'])?$section1['educational_institute_address']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['educational_institute_address_city'])?$section1['educational_institute_address_city']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >State</td>
|
||||
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['educational_institute_address_state'])?$section1['educational_institute_address_state']:'Not Provided'; ?></td>
|
||||
<td colspan="2" >PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['educational_institute_address_pincode'])?$section1['educational_institute_address_pincode']:'Not Provided'; ?></td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td colspan="3"> Class /Section/ Course Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['class_section_course_name'])?$section1['class_section_course_name']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Educational Institute Fee (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_fee'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['educational_institute_fee']):'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Duration of the Course (months)</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['duration_of_the_course'])?$section1['duration_of_the_course']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_amount_applied'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount_applied']):'Not Provided'; ?> </td>
|
||||
<td colspan="2" >Loan Tenure (Months)</td>
|
||||
<td class = "tdcenteralign" colspan="2"> <?php echo isset($section1['loan_tenor'])?$section1['loan_tenor']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="3">Total Fund Requirement (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['total_fund_requirement'])?$rupee_symbol.' '. MYUTIL::customIndianNumberFormat($section1['total_fund_requirement']):'Not Provided'; ?> </td>
|
||||
<td colspan="2" ></td>
|
||||
<td class = "tdcenteralign" colspan="2"></td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="page_break"></div>
|
||||
<br><table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Satellite Image of PD Location</th></tr></table><br>
|
||||
<p><b>GPS Coordinates of location where PD Visit was done : <?php echo $geo_location ? $geo_location : '-'; ?></b></p>
|
||||
<?php if($geo_location) { ?>
|
||||
<img style="border:3px solid #0d93a9;" src = "<?php echo 'data:image/gif;base64,'.$satellite_image[0]['img']; ?>" alt = "PD Visted Location Satellite Image " height="300px" width="630px">
|
||||
<?php
|
||||
}else{ echo '<p>Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown</p>';}
|
||||
?>
|
||||
<?php
|
||||
$iter = 0;
|
||||
// $photo_names = array('selfie_with_person_met' => 'Selfie with person met','satellite1' => 'satellite');
|
||||
$photo_names = array('selfie_with_person_met' => 'Selfie with person met','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','workplace_interior_image' => 'Workplace interior image','satellite1' => 'satellite');
|
||||
|
||||
$tot_rows = ceil(count($section9) / 3);
|
||||
|
||||
if(count($section9))
|
||||
{
|
||||
echo '<div id="page_break"></div>';
|
||||
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
|
||||
|
||||
$add_factor = 0;
|
||||
for($row = 0;$row < $tot_rows; $row++)
|
||||
{
|
||||
echo '<tr>';
|
||||
|
||||
$from = $row == 0 ? $row : ($row+$add_factor);
|
||||
$to = ($from + 2);
|
||||
$add_factor = $add_factor + 2;
|
||||
for($i = $from ; $i <= $to; $i++)
|
||||
{
|
||||
|
||||
if(isset($section9[$i]))
|
||||
{
|
||||
|
||||
echo '<td style="text-align:center;border:1px solid;"> <img src="'.$section9[$i]['img'].'" height = "200" width="200" alt="'.$section9[$i]['img_name'].'"/><br>'.$photo_names [ $section9[$i]['img_name'] ].'</td>';
|
||||
}
|
||||
|
||||
//unset($p_key);
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@ -141,7 +141,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</footer>
|
||||
<header>
|
||||
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://www.smcfinance.com/images/logo-small.jpg'/></div>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/smc_logo.png'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</footer>
|
||||
<header>
|
||||
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://www.smcfinance.com/images/logo-small.jpg'/></div>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/smc_logo.png'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
|
||||
@ -207,7 +207,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</footer>
|
||||
<header>
|
||||
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://www.smcfinance.com/images/logo-small.jpg'/></div>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/smc_logo.png'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
@ -1552,8 +1552,10 @@ if(count($smc_images))
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<?php if($report_attachments){
|
||||
echo $report_attachments;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@ -192,7 +192,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</footer>
|
||||
<header>
|
||||
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://www.smcfinance.com/images/logo-small.jpg'/></div>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/smc_logo.png'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</footer>
|
||||
<header>
|
||||
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://www.smcfinance.com/images/logo-small.jpg'/></div>
|
||||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/smc_logo.png'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
@ -594,8 +594,10 @@ if(count($smc_images))
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<?php if($report_attachments){
|
||||
echo $report_attachments;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user