Fi Form Credit query : ps
This commit is contained in:
parent
7d9c07d4bf
commit
f322d552d8
@ -589,7 +589,7 @@ class Data_Dump_Controller extends REST_Controller
|
||||
$newDate1 = date("Y-m-d", strtotime($from_date));
|
||||
$newDate2 = date("Y-m-d", strtotime($to_date));
|
||||
log_message('ERROR', "PD Date Given Format => " . $from_date ." to ".$to_date." Changed ".$newDate1." to ".$newDate2);
|
||||
$where = 'DATE_FORMAT(PDTRIGGER.createdon, "%Y-%m-%d") BETWEEN ' ."'$newDate1'". ' AND ' ."'$newDate2'";
|
||||
$where = 'DATE(PDTRIGGER.createdon) BETWEEN ' ."'$newDate1'". ' AND ' ."'$newDate2'";
|
||||
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, $where => null);
|
||||
}
|
||||
else{
|
||||
@ -600,9 +600,11 @@ class Data_Dump_Controller extends REST_Controller
|
||||
// 'PDTRIGGER.fk_customer_segment'=> 11 // 1 4 5 8 9 10 11
|
||||
$tgr_dtls = $this->PD_Model->getJoinRecords($columns, $table, $joins, $tgr_cond_arr);
|
||||
log_message('ERROR', "Trigger Details Total Records => " . count($tgr_dtls));
|
||||
// echo count($tgr_dtls);
|
||||
// print_r($tgr_dtls); print_r($this->db->last_query());die();
|
||||
// $i = 0; // testing Purpose only
|
||||
// for($i = 0 ;$i < 3;$i++){ // testing purpose only.
|
||||
if(!empty($tgr_dtls)){
|
||||
for ($i = 0; $i < count($tgr_dtls); $i++) {
|
||||
$pdid = $tgr_dtls[$i]['pd_id'];
|
||||
log_message('ERROR', "trigger details for Loop inx = " . $i . " PDID = " . $pdid);
|
||||
@ -658,9 +660,14 @@ class Data_Dump_Controller extends REST_Controller
|
||||
}
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
// $data['earliest'] = $earliest;
|
||||
$data['earliest'] = $earliest;
|
||||
// $data['totalDetailsInCount'] =count($tgr_dtls);
|
||||
// $data['before 90 days data'] = $tgr_dtls;
|
||||
|
||||
}else{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
}
|
||||
$this->response($data, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@ -900,7 +907,7 @@ class Data_Dump_Controller extends REST_Controller
|
||||
break;
|
||||
case 18:
|
||||
// 18 is_person_met_pic , is_person_met_id_proof
|
||||
$arr18 = array('is_person_met_pic', 'is_person_met_id_proof');
|
||||
$arr18 = array('is_person_met_pic', 'is_person_met_id_proof','applicant_name');
|
||||
$replaced_pj_arr = $this->traverseArray($replaced_pj_arr, $arr18, $general_format);
|
||||
$replaced_j_arr = $this->traverseArray($replaced_j_arr, $arr18, $general_format);
|
||||
break;
|
||||
@ -1008,4 +1015,11 @@ class Data_Dump_Controller extends REST_Controller
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
function f_get(){
|
||||
$fields = array('processed_json','json');
|
||||
$where_condition_array = array('isactive' => 1, 'fk_pd_id' => 1, 'fk_form_id' => 18);
|
||||
$pd_processed_forms = $this->PD_Model->selectCustomRecords($fields, $where_condition_array, PDFORMDETAILSJSON, array(), '', 'company_id', 'ASC');
|
||||
print_r($pd_processed_forms);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4698,11 +4698,15 @@ 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);
|
||||
for ($dinx = 0; $dinx < count($db_result); $dinx++) {
|
||||
$string = $db_result[$dinx]['facecrop'];
|
||||
$my_array[$dinx] = json_decode($string, true);
|
||||
$fc_array = array();
|
||||
if(!empty($db_result)){
|
||||
for ($dinx = 0; $dinx < count($db_result); $dinx++) {
|
||||
$string = $db_result[$dinx]['facecrop'];
|
||||
// echo gettype($string);
|
||||
$fc_array[$dinx] = json_decode($string, true);
|
||||
}
|
||||
}
|
||||
$data['facecrop'] = $my_array;
|
||||
$data['facecrop'] = $fc_array;
|
||||
// echo "i ahve image";
|
||||
// print_r($data['pd_images']);die();
|
||||
$t = 'DEFAULT DATA';
|
||||
@ -4761,6 +4765,8 @@ class PD_Controller extends REST_Controller
|
||||
// {
|
||||
// $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true);
|
||||
// }
|
||||
echo $t;
|
||||
die();
|
||||
|
||||
|
||||
$pd_report_time = date('Y-m-d-H-i-s');
|
||||
|
||||
@ -1529,15 +1529,15 @@ class PD_Model extends SPARQ_Model {
|
||||
$FIForm = array();
|
||||
if(!empty($fi_id)){
|
||||
if($fi_id == 1){
|
||||
$FIForm = array(27,28,29,31,32,33,34);
|
||||
$FIForm = array(27,28,29,32,33,34);
|
||||
}else if($fi_id == 2){
|
||||
$FIForm = array(27,28,29,31,33,34);
|
||||
$FIForm = array(27,28,29,33,34);
|
||||
}else if($fi_id == 3){
|
||||
$FIForm = array(27,28,30,31,33,34);
|
||||
$FIForm = array(27,28,30,33,34);
|
||||
}
|
||||
if(!empty($pd_additional_requirements) && !empty($FIForm)){
|
||||
array_splice($FIForm, 3, 0, 31);
|
||||
}
|
||||
// else{
|
||||
|
||||
// }
|
||||
}
|
||||
$this->db->SELECT('PDFORMS.pd_form_id as form_id,PDFORMS.pd_form_order,PDFORMS.pd_form_level_order,PDFORMS.pd_form_name,REPLACE(PDFORMS.pd_form_name,"FI ","") as form_name');
|
||||
$this->db->FROM(PDFORMS.' as PDFORMS');
|
||||
@ -1718,6 +1718,8 @@ class PD_Model extends SPARQ_Model {
|
||||
}
|
||||
$result_data['pdapplicants_detials'] = $pd_applicants_detials;
|
||||
$result_data['template_forms'] = array_values($template_forms);
|
||||
print_r($result_data);
|
||||
die();
|
||||
return $result_data;
|
||||
}
|
||||
|
||||
@ -2601,7 +2603,7 @@ class PD_Model extends SPARQ_Model {
|
||||
$template_forms = $this->db->GET()->result_array();
|
||||
//here Hard-coded
|
||||
if(count($template_forms) > 0){
|
||||
if((int)$pd_master_detials[0]['fk_pd_type'] == 4){
|
||||
if((int)$pd_master_detials[0]['fk_pd_type'] == 4 && (!empty($pd_additional_requirements))){
|
||||
array_push($template_forms,Array('map_id'=>$map_id,'form_id' => '31','pd_form_order' => '5','pd_form_level_order' => '2','form_name' => 'Credit Manager Queries','is_form_disabled'=>0,"template_id"=>null));
|
||||
}else{
|
||||
array_push($template_forms,Array('map_id'=>$map_id,'form_id' => '18','pd_form_order' => '2','pd_form_level_order' => '1','form_name' => 'General Information','is_form_disabled'=>0,"template_id"=>null));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user