LOG ENABLED FOR SAVE AND GET JSON
This commit is contained in:
parent
2f04acd637
commit
45148746f9
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
$config['api_user_auth_info'] = array(
|
$config['api_user_auth_info'] = array(
|
||||||
'saveNewUser' => array(10),
|
'saveNewUser' => array(10),
|
||||||
'updateExistUser' => array(10,4,5),
|
//'updateExistUser' => array(10,4,5),
|
||||||
//'getUsersDetails' => array(),
|
//'getUsersDetails' => array(),
|
||||||
//'triggerNewPD' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
|
//'triggerNewPD' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
|
||||||
//'updatePDMaster' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
|
//'updatePDMaster' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
|
||||||
|
|||||||
@ -1695,7 +1695,7 @@ public function assignPDTempalate($data)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Find General Team ID
|
//echo 'Find General Team ID';
|
||||||
$fields = array('pdteam_id');
|
$fields = array('pdteam_id');
|
||||||
$where_condition_array = array('team_name' => "General");
|
$where_condition_array = array('team_name' => "General");
|
||||||
$general_team_id = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDTEAM);
|
$general_team_id = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDTEAM);
|
||||||
@ -2373,6 +2373,11 @@ public function assignPDTempalate($data)
|
|||||||
$parent_forms = $this->config->item('parent_forms');
|
$parent_forms = $this->config->item('parent_forms');
|
||||||
$additional_pd_id = $pdid;
|
$additional_pd_id = $pdid;
|
||||||
|
|
||||||
|
$logger = MYLOG::logFunction(null,$pdid);
|
||||||
|
$log_info_array['pdid'] = $pdid;
|
||||||
|
$log_info_array['formid'] = $formid;
|
||||||
|
$logger->info("SAVE FORM JSON FUNCTION CALLED - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
|
|
||||||
$inline_forms_photo_status_check = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' => $pdid),T_PD_INLINE_PHOTO_FORM_STATUS);
|
$inline_forms_photo_status_check = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' => $pdid),T_PD_INLINE_PHOTO_FORM_STATUS);
|
||||||
// print_r($inline_forms_photo_status_check);
|
// print_r($inline_forms_photo_status_check);
|
||||||
// echo count($inline_forms_photo_status_check);
|
// echo count($inline_forms_photo_status_check);
|
||||||
@ -2557,6 +2562,8 @@ public function assignPDTempalate($data)
|
|||||||
$temp_array = array('fk_form_id'=>$formid,'company_id' => $company_id,'fk_pd_id'=>$pdid,'fk_createdby'=>$createdby,'json'=>$records,'processed_json' => $processed_json,'rental_count_id' => $rental_count_id);
|
$temp_array = array('fk_form_id'=>$formid,'company_id' => $company_id,'fk_pd_id'=>$pdid,'fk_createdby'=>$createdby,'json'=>$records,'processed_json' => $processed_json,'rental_count_id' => $rental_count_id);
|
||||||
|
|
||||||
$id = $this->PD_Model->saveRecords($temp_array,PDFORMDETAILSJSON);
|
$id = $this->PD_Model->saveRecords($temp_array,PDFORMDETAILSJSON);
|
||||||
|
|
||||||
|
$logger->info("SAVE FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
if($id != "" || $id != null)
|
if($id != "" || $id != null)
|
||||||
{
|
{
|
||||||
// Update form dummy entry against Additional PD common form ID to avoid every time fetch data from additional PD forms - scenarios like exist loan obligations, other family details
|
// Update form dummy entry against Additional PD common form ID to avoid every time fetch data from additional PD forms - scenarios like exist loan obligations, other family details
|
||||||
@ -2602,7 +2609,10 @@ public function getPDFormDetailsJSON_post()
|
|||||||
$pd_id = $parent_form_index != null ? $parent_pd_id : $pd_id;
|
$pd_id = $parent_form_index != null ? $parent_pd_id : $pd_id;
|
||||||
|
|
||||||
}
|
}
|
||||||
//echo $pd_id;echo $pd_form_id;
|
$logger = MYLOG::logFunction(null,$pd_id);
|
||||||
|
$log_info_array['pdid'] = $pdid;
|
||||||
|
$log_info_array['formid'] = $pd_form_id;
|
||||||
|
$logger->info("GET FORM JSON FUNCTION CALLED - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
|
|
||||||
if($pd_form_id == 18)
|
if($pd_form_id == 18)
|
||||||
{
|
{
|
||||||
@ -2620,7 +2630,8 @@ public function getPDFormDetailsJSON_post()
|
|||||||
|
|
||||||
if(count($rec))
|
if(count($rec))
|
||||||
{
|
{
|
||||||
$temp_json = $this->renewGeneralFormForAddtionalPD($rec[0]['json']);
|
$temp_json = $this->renewGeneralFormForAddtionalPD($rec[0]['json']);
|
||||||
|
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$data['records'] = $temp_json;
|
$data['records'] = $temp_json;
|
||||||
@ -2641,7 +2652,7 @@ public function getPDFormDetailsJSON_post()
|
|||||||
|
|
||||||
if(count($form_count))
|
if(count($form_count))
|
||||||
{
|
{
|
||||||
|
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$data['records'] = json_decode($form_count[0]['json']);
|
$data['records'] = json_decode($form_count[0]['json']);
|
||||||
@ -2662,7 +2673,8 @@ public function getPDFormDetailsJSON_post()
|
|||||||
$address[] = array('address' => $temp_address['addressline1'],'address_type' => "",'address_type_others' => '','state'=>$temp_address['fk_state'],'city'=>$temp_address['fk_city'],'citySearch' =>'','stateSearch'=>'','citySearch'=>'','pinSearch' => '','pincode'=>$temp_address['pincode'],'pincode_others' => '','locality' => '','locality_others'=>'','pd_location' => '','comment_locality' => '','estimated_area' => '','uom' => '','uom_others'=>'');
|
$address[] = array('address' => $temp_address['addressline1'],'address_type' => "",'address_type_others' => '','state'=>$temp_address['fk_state'],'city'=>$temp_address['fk_city'],'citySearch' =>'','stateSearch'=>'','citySearch'=>'','pinSearch' => '','pincode'=>$temp_address['pincode'],'pincode_others' => '','locality' => '','locality_others'=>'','pd_location' => '','comment_locality' => '','estimated_area' => '','uom' => '','uom_others'=>'');
|
||||||
|
|
||||||
$records['addresses'] = $address;
|
$records['addresses'] = $address;
|
||||||
$records['address_form_remark'] = '';
|
$records['address_form_remark'] = '';
|
||||||
|
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$data['records'] = $records;
|
$data['records'] = $records;
|
||||||
@ -2724,7 +2736,7 @@ public function getPDFormDetailsJSON_post()
|
|||||||
{
|
{
|
||||||
$json = json_decode($rec[0]['json']);
|
$json = json_decode($rec[0]['json']);
|
||||||
}
|
}
|
||||||
|
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$data['records'] = $json;
|
$data['records'] = $json;
|
||||||
@ -2732,6 +2744,7 @@ public function getPDFormDetailsJSON_post()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
|
||||||
$data['dataStatus'] = false;
|
$data['dataStatus'] = false;
|
||||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||||
$data['msg'] = 'No Data Available';
|
$data['msg'] = 'No Data Available';
|
||||||
@ -7480,25 +7493,27 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
if($records)
|
if($records)
|
||||||
{
|
{
|
||||||
$report_data = $records;
|
$report_data = $records;
|
||||||
|
|
||||||
|
//attach outer HTML tags
|
||||||
$start_pos = strpos($report_data,'</script>');
|
$start_pos = strpos($report_data,'</script>');
|
||||||
$end_pos = $start_pos + 10;
|
$end_pos = $start_pos + 10;
|
||||||
$report_data = substr_replace($report_data,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
|
$report_data = substr_replace($report_data,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
|
||||||
$report_data = substr_replace($report_data,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
|
$report_data = substr_replace($report_data,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
|
||||||
$report_data = substr_replace($report_data,'</body></html>',-1,0);
|
$report_data = substr_replace($report_data,'</body></html>',-1,0);
|
||||||
|
|
||||||
|
//replace tooltip and span tags
|
||||||
$total_replaces = substr_count($t,'<span class="tooltip">');
|
$total_replaces = substr_count($report_data,'<span class="tooltip">');
|
||||||
for($i = 0 ;$i < $total_replaces;$i++)
|
for($i = 0 ;$i < $total_replaces;$i++)
|
||||||
{
|
{
|
||||||
$start_pos = strpos($t,'<span class="tooltiptext">');
|
$start_pos = strpos($report_data,'<span class="tooltiptext">');
|
||||||
|
|
||||||
$end_pos = strpos($t, '</span>', strpos($t,'<span class="tooltiptext">'));
|
$end_pos = strpos($report_data, '</span>', strpos($report_data,'<span class="tooltiptext">'));
|
||||||
$end_pos = $end_pos + 14;
|
$end_pos = $end_pos + 14;
|
||||||
//echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-';
|
//echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-';
|
||||||
|
|
||||||
$t = substr_replace($t,'',$start_pos,($end_pos - $start_pos));
|
$report_data = substr_replace($report_data,'',$start_pos,($end_pos - $start_pos));
|
||||||
|
|
||||||
$t = substr_replace($t,'',strpos($t,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
|
$report_data = substr_replace($report_data,'',strpos($report_data,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7506,6 +7521,22 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
{
|
{
|
||||||
$report_data = $this->getLatestPDReportHTMLFile($pdid,$random_string,true);
|
$report_data = $this->getLatestPDReportHTMLFile($pdid,$random_string,true);
|
||||||
|
|
||||||
|
//replace tooltip and span tags
|
||||||
|
$total_replaces = substr_count($report_data,'<span class="tooltip">');
|
||||||
|
for($i = 0 ;$i < $total_replaces;$i++)
|
||||||
|
{
|
||||||
|
$start_pos = strpos($report_data,'<span class="tooltiptext">');
|
||||||
|
|
||||||
|
$end_pos = strpos($report_data, '</span>', strpos($report_data,'<span class="tooltiptext">'));
|
||||||
|
$end_pos = $end_pos + 14;
|
||||||
|
//echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-';
|
||||||
|
|
||||||
|
$report_data = substr_replace($report_data,'',$start_pos,($end_pos - $start_pos));
|
||||||
|
|
||||||
|
$report_data = substr_replace($report_data,'',strpos($report_data,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf_doc = $this->pdfgenerator->generate($report_data, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
$pdf_doc = $this->pdfgenerator->generate($report_data, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||||
@ -8463,7 +8494,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
{
|
{
|
||||||
$data['dataStatus'] = false;
|
$data['dataStatus'] = false;
|
||||||
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
|
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
|
||||||
$data['msg'] = 'No Lender Profile was found under selected branch. Create Lender profile in this branch';
|
$data['msg'] = 'Credit Person Lender Profile was not found?. Create Credit Person Lender profile';
|
||||||
$this->response($data,REST_Controller::HTTP_OK);
|
$this->response($data,REST_Controller::HTTP_OK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -205,12 +205,11 @@ return $result;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getCORES($BUCKETNAME)
|
public function getCORES($BUCKETNAME)
|
||||||
{
|
{
|
||||||
$result = $this->S3->getBucketCors([
|
$result = $this->S3->getBucketCors([
|
||||||
'Bucket' => $BUCKETNAME]);
|
'Bucket' => $BUCKETNAME]);
|
||||||
//////print_r($result);
|
//////print_r($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,10 @@ class PD_Model extends SPARQ_Model {
|
|||||||
|
|
||||||
if($pdofficerid != "" || $pdofficerid != null)
|
if($pdofficerid != "" || $pdofficerid != null)
|
||||||
{
|
{
|
||||||
$this->db->WHERE('PDTRIGGER.fk_pd_allocated_to',$pdofficerid);
|
if($pdofficerid != 52) //support pd officer user id
|
||||||
|
{
|
||||||
|
$this->db->WHERE('PDTRIGGER.fk_pd_allocated_to',$pdofficerid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($lenderid != "" || $lenderid != null)
|
if($lenderid != "" || $lenderid != null)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user