diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index fe43775d..db100ab5 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -4646,9 +4646,10 @@ class PD_Controller extends REST_Controller
$data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid, null, null, 'common', null, 'report');
}
$db_result = $this->PD_Model->selectCustomRecords(array('facecrop'), array('fk_pd_id' => $pdid,'isactive'=>1), PDAPPLICANTSDETAILS);
- $string = $db_result[0]['facecrop'];
- // echo gettype($string);
- $my_array = json_decode($string, true);
+ for ($dinx = 0; $dinx < count($db_result); $dinx++) {
+ $string = $db_result[$dinx]['facecrop'];
+ $my_array[$dinx] = json_decode($string, true);
+ }
$data['facecrop'] = $my_array;
// echo "i ahve image";
// print_r($data['pd_images']);die();
@@ -5802,9 +5803,11 @@ class PD_Controller extends REST_Controller
}
$db_result = $this->PD_Model->selectCustomRecords(array('facecrop'), array('fk_pd_id' => $pdid,'isactive'=>1), PDAPPLICANTSDETAILS);
- $string = $db_result[0]['facecrop'];
- // echo gettype($string);
- $my_array = json_decode($string, true);
+ for ($dinx = 0; $dinx < count($db_result); $dinx++) {
+ $string = $db_result[$dinx]['facecrop'];
+ // echo gettype($string);
+ $my_array[$dinx] = json_decode($string, true);
+ }
$data['facecrop'] = $my_array;
// echo gettype($my_array);
// print_r($my_array);
@@ -10497,11 +10500,11 @@ class PD_Controller extends REST_Controller
- // public function toMakeFaceBoundingBox_get(){
- public function toMakeFaceBoundingBox($pdid,$len_id){
- // $pdid = $this->get('pd'); //comment this bcoz test purpose
- // $master_details = $this->PD_Model->getPDMasterDetails($pdid); //comment this bcoz test purpose
- // $len_id = $master_details[0]['fk_lender_id']; //comment this bcoz test purpose
+ public function toMakeFaceBoundingBox_get(){
+ // public function toMakeFaceBoundingBox($pdid,$len_id){
+ $pdid = $this->get('pd'); //comment this bcoz test purpose
+ $master_details = $this->PD_Model->getPDMasterDetails($pdid); //comment this bcoz test purpose
+ $len_id = $master_details[0]['fk_lender_id']; //comment this bcoz test purpose
log_message('ERROR', "In PD Controller (to Make FaceBoundingBox called ) PDID : " . $pdid);
$where = array('isactive' => 1, 'fk_form_id' => 18, 'fk_pd_id' => $pdid);
@@ -10557,7 +10560,6 @@ class PD_Controller extends REST_Controller
$where_condition_array['image_key in ("selfie_with_person_met","person_met_id")'] = null;
$select_col = array('pd_document_id', 'pd_document_name', 'pd_document_title', 'image_key');
$img_result = $this->PD_Model->selectCustomRecords($select_col, $where_condition_array, PDDOCUMENTS);
- // print_r($this->db->last_query());
// echo count($img_result);
// print_r($img_result);
@@ -10582,7 +10584,7 @@ class PD_Controller extends REST_Controller
$response = faceapi::toMakeFaceBoundingBox($bounding_box, $destination_path, $file_name, $img_result[$k]['image_key'], $apcntid);
array_push($img_response, $response);
if (($img_result[$k]['image_key'] == 'selfie_with_person_met')) {
- $this->uploadPicInS3($pdid, $destination_path, $bucketname, $applicants_details[$j]['pd_co_applicant_id']);
+ $this->uploadPicInS3($pdid, $destination_path, $bucketname, $applicants_details[$j]['pd_co_applicant_id'],$extension);
}
// faceapi::toMakeFaceBoundingBox($bounding_box,$destination_path,$file_name);
@@ -10613,9 +10615,9 @@ class PD_Controller extends REST_Controller
}
} else {
log_message('ERROR', "In PD Controller to Make FaceBoundingBox Faceapi Image Already Generated");
- $data['dataStatus'] = false;
- $data['status'] = REST_Controller::HTTP_NO_CONTENT;
- $data['msg'] = 'Faceapi Image Already Generated 2';
+ // $data['dataStatus'] = false;
+ // $data['status'] = REST_Controller::HTTP_NO_CONTENT;
+ // $data['msg'] = 'Faceapi Image Already Generated 2';
}
} // for @ $applicants_details = j
} else {
@@ -10629,8 +10631,9 @@ class PD_Controller extends REST_Controller
// $this->response($data, REST_Controller::HTTP_OK);
}
- public function uploadPicInS3($pdid,$destination_path,$bucketname,$apcntid){
- $file = "face_api_image_".$apcntid.".jpeg";
+ public function uploadPicInS3($pdid,$destination_path,$bucketname,$apcntid,$extension){
+ $file = "face_api_image_".$apcntid.$extension;
+ $dbfile = "face_api_image_".$apcntid.".jpeg";
$key = 'pd' . $pdid . '/' . $file;
$sourcefile = $destination_path.$file;
@@ -10642,11 +10645,11 @@ class PD_Controller extends REST_Controller
log_message('ERROR', "In PD Controller to Make FaceBoundingBox updating pdtrigger table facemark_image_generated as 1");
// Make inactive old entries with same data
$this->db->WHERE('fk_pd_id', $pdid)
- ->WHERE('pd_document_title', 'face_api_result_image')->UPDATE(PDDOCUMENTS, array('isactive' => 0));
+ ->WHERE('pd_document_title', 'face_api_result_image_'.$apcntid)->UPDATE(PDDOCUMENTS, array('isactive' => 0));
// then update
$this->db->WHERE('fk_pd_id', $pdid)->WHERE('pd_co_applicant_id', $apcntid)->UPDATE(PDAPPLICANTSDETAILS, array('facemark_image_generated' => 1));
log_message('ERROR', "In PD Controller to Make FaceBoundingBox save document table face_api_result_image after unlink");
- $record_data = array('fk_pd_id' => $pdid, 'pd_document_title' => 'face_api_result_image', 'pd_document_name' => $file ,'co_applicant_id'=>$apcntid,'image_key'=>'face_mark');
+ $record_data = array('fk_pd_id' => $pdid, 'pd_document_title' => 'face_api_result_image_'.$apcntid, 'pd_document_name' => $dbfile ,'co_applicant_id'=>$apcntid,'image_key'=>'face_mark');
$this->PD_Model->saveRecords($record_data, PDDOCUMENTS);
unlink($destination_path.$file);
}
diff --git a/api/application/helpers/faceapi_helper.php b/api/application/helpers/faceapi_helper.php
index 59508f16..99bf5959 100644
--- a/api/application/helpers/faceapi_helper.php
+++ b/api/application/helpers/faceapi_helper.php
@@ -8,7 +8,6 @@ class faceapi
log_message('ERROR', "In faceapi helper @ line no : 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);
diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
index dbc651b8..4c80c722 100644
--- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php
+++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
@@ -742,8 +742,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Face Comparison" ;
$notequal_mark ='
Loan Applicants:
diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_CLIX_SMARTPD.php index e2e02013..50d71762 100644 --- a/api/application/views/report_templates/JSONTOREPORT_CLIX_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_CLIX_SMARTPD.php @@ -749,8 +749,10 @@ font-weight: bolder;;Loan Applicants:
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index abb045a9..1d700b30 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -759,8 +759,10 @@ if ( isset($pdf) ) {Applicants:
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php index eec38cbf..01a596f9 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php @@ -719,8 +719,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo 'Applicants:
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php index cac17c7b..263ce64a 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php @@ -741,8 +741,10 @@ if ( isset($pdf) ) {Loan Applicants:
diff --git a/api/application/views/report_templates/JSONTOREPORT_RI_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_RI_SMARTPD.php index b27d2bcf..0ef9e146 100644 --- a/api/application/views/report_templates/JSONTOREPORT_RI_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_RI_SMARTPD.php @@ -709,8 +709,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');Loan Applicants:
diff --git a/api/application/views/report_templates/JSONTOREPORT_RI_TELE_PD.php b/api/application/views/report_templates/JSONTOREPORT_RI_TELE_PD.php index 83fb10a4..f245bd2c 100644 --- a/api/application/views/report_templates/JSONTOREPORT_RI_TELE_PD.php +++ b/api/application/views/report_templates/JSONTOREPORT_RI_TELE_PD.php @@ -710,8 +710,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');Loan Applicants: