SAVE AND GET LOG ENABLED

This commit is contained in:
Velz2020 2019-09-14 11:39:13 +05:30
parent 08a60022b9
commit da92cc9c79

View File

@ -2360,6 +2360,9 @@ public function assignPDTempalate($data)
{ {
//ini_set('max_execution_time', 60); //ini_set('max_execution_time', 60);
//$this->load->helper('INLINEPHOTOTRANSFORM'); //$this->load->helper('INLINEPHOTOTRANSFORM');
$custom_log_info = (int) $_SERVER['CONTENT_LENGTH'].' ###savePDFormDetailsJSON Function Called - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$records = $this->post('records'); $records = $this->post('records');
$pdid = $records['pdid']; $pdid = $records['pdid'];
$formid = $records['formid']; $formid = $records['formid'];
@ -2413,12 +2416,17 @@ public function assignPDTempalate($data)
if($formid == 10) if($formid == 10)
{ {
$this->updateSubProductFromLoanDetailsForm($records); $this->updateSubProductFromLoanDetailsForm($records);
$custom_log_info = '###updateSubProductFromLoanDetailsForm Function Called - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
} }
//From Business form save Employee Salary as Business Expenses //From Business form save Employee Salary as Business Expenses
if($formid == 13) if($formid == 13)
{ {
$this->saveEmpSalaryAsBusinessExpensesFromBusinessForm($records); $this->saveEmpSalaryAsBusinessExpensesFromBusinessForm($records);
$custom_log_info = '###saveEmpSalaryAsBusinessExpensesFromBusinessForm Function Called - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
// if(count($inline_forms_photo_status_check) && $inline_forms_photo_status_check[0]['is_business_photo_saved'] != 1) // if(count($inline_forms_photo_status_check) && $inline_forms_photo_status_check[0]['is_business_photo_saved'] != 1)
// { // {
@ -2430,6 +2438,8 @@ public function assignPDTempalate($data)
if($formid == 22) if($formid == 22)
{ {
$this->saveAssetRentAsBusinessExpensesFromBusinessAssestForm($records); $this->saveAssetRentAsBusinessExpensesFromBusinessAssestForm($records);
$custom_log_info = '###saveAssetRentAsBusinessExpensesFromBusinessAssestForm Function Called - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
} }
@ -2446,6 +2456,8 @@ public function assignPDTempalate($data)
} }
$id = $this->PD_Model->updateRecords($fields,PDFORMDETAILSJSON,$where_condition_array); $id = $this->PD_Model->updateRecords($fields,PDFORMDETAILSJSON,$where_condition_array);
$custom_log_info = '###OLD Entries Deactivated - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
/*****Call Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA******/ /*****Call Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA******/
@ -2537,7 +2549,8 @@ public function assignPDTempalate($data)
//echo "Something Wrong! Form ID did not match, Contact System Administrator"; //echo "Something Wrong! Form ID did not match, Contact System Administrator";
} }
} }
$custom_log_info = '###Processed JSON Function Executed - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
/*****End of Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA*******/ /*****End of Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA*******/
@ -2570,6 +2583,8 @@ public function assignPDTempalate($data)
// $id = $this->PD_Model->saveRecords($temp_array,PDFORMDETAILSJSON); // $id = $this->PD_Model->saveRecords($temp_array,PDFORMDETAILSJSON);
// } // }
// End Of update Additional Entry // End Of update Additional Entry
$custom_log_info = '### JSON Saved Successfully - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$data['dataStatus'] = true; $data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK; $data['status'] = REST_Controller::HTTP_OK;
@ -2589,7 +2604,9 @@ public function assignPDTempalate($data)
public function getPDFormDetailsJSON_post() public function getPDFormDetailsJSON_post()
{ {
//echo (memory_get_usage()/1024) /1024;die(); $custom_log_info = '###getPDFormDetailsJSON Function Executed - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$pd_id = $this->post('pd_id'); $pd_id = $this->post('pd_id');
$pd_form_id = $this->post('pd_form_id'); $pd_form_id = $this->post('pd_form_id');
$parent_pd_id = $this->post('parent_pdid');// ? $this->post('parent_pd_id') : null; $parent_pd_id = $this->post('parent_pdid');// ? $this->post('parent_pd_id') : null;
@ -2629,6 +2646,10 @@ public function getPDFormDetailsJSON_post()
{ {
$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); $logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
$custom_log_info = '###renewGeneralFormForAddtionalPD Function Called (ADDItional PD ) - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$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;
@ -2650,6 +2671,10 @@ public function getPDFormDetailsJSON_post()
if(count($form_count)) if(count($form_count))
{ {
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array); $logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
$custom_log_info = '###Return Response FROM GET PD FORM JSON - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$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']);
@ -2672,6 +2697,10 @@ public function getPDFormDetailsJSON_post()
$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); $logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
$custom_log_info = '###Return Response FROM GET PD FORM JSON (ADDRESS FORM ADDITIONAL PD) - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$data['dataStatus'] = true; $data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK; $data['status'] = REST_Controller::HTTP_OK;
$data['records'] = $records; $data['records'] = $records;
@ -2702,7 +2731,8 @@ public function getPDFormDetailsJSON_post()
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id']; $bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
if($pd_form_id == 18) //General form if($pd_form_id == 18) //General form
{ {
$custom_log_info = '###Get General FOrm IMG AWS urls & attach into JSON Function Called - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$result_data = $this->PD_Model->getSignedPDDocsURL($pd_id,18,null,null,null); $result_data = $this->PD_Model->getSignedPDDocsURL($pd_id,18,null,null,null);
foreach($temp_rec['individuals'] as $g_key => $g_value) foreach($temp_rec['individuals'] as $g_key => $g_value)
@ -2726,12 +2756,19 @@ public function getPDFormDetailsJSON_post()
} }
} }
} }
$custom_log_info = '###Get General FOrm IMG AWS urls & attach into JSON Function End - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
} }
if($pd_form_id == 13 ) //ABout Business form if($pd_form_id == 13 ) //ABout Business form
{ {
$custom_log_info = '###Get Business IMG AWS urls & attach into JSON Function Called - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$result_data = $this->PD_Model->getSignedPDDocsURL($pd_id,13,$company_id,null,null); $result_data = $this->PD_Model->getSignedPDDocsURL($pd_id,13,$company_id,null,null);
foreach($result_data as $b_key => $b_value) foreach($result_data as $b_key => $b_value)
@ -2778,10 +2815,13 @@ public function getPDFormDetailsJSON_post()
} }
} }
// print_r($result_data); // print_r($result_data);
$rec[0]['json'] = json_encode($temp_rec);
$custom_log_info = '###Get Business IMG AWS urls & attach into JSON Function End - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
} }
} }
$rec[0]['json'] = json_encode($temp_rec);
} }
// print_r($rec);die(); // print_r($rec);die();
// if(count($rec)) // if(count($rec))
@ -2827,6 +2867,10 @@ public function getPDFormDetailsJSON_post()
} }
$logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array); $logger->info("GET FORM JSON FUNCTION RESPONSE - ENV (".ENVIRONMENT.")",$log_info_array);
$custom_log_info = '###Return Response FROM GET PD FORM JSON - '. date('Y-m-d H:i:s A');
log_message('ERROR',$custom_log_info);
$data['dataStatus'] = true; $data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK; $data['status'] = REST_Controller::HTTP_OK;
$data['records'] = $json; $data['records'] = $json;