diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 70a5b658..5c9aba0c 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2360,6 +2360,9 @@ public function assignPDTempalate($data) { //ini_set('max_execution_time', 60); //$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'); $pdid = $records['pdid']; $formid = $records['formid']; @@ -2413,12 +2416,17 @@ public function assignPDTempalate($data) if($formid == 10) { $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 if($formid == 13) { + $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) // { @@ -2430,6 +2438,8 @@ public function assignPDTempalate($data) if($formid == 22) { $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); + $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******/ @@ -2537,7 +2549,8 @@ public function assignPDTempalate($data) //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*******/ @@ -2570,6 +2583,8 @@ public function assignPDTempalate($data) // $id = $this->PD_Model->saveRecords($temp_array,PDFORMDETAILSJSON); // } // 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['status'] = REST_Controller::HTTP_OK; @@ -2589,7 +2604,9 @@ public function assignPDTempalate($data) 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_form_id = $this->post('pd_form_id'); $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']); $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['status'] = REST_Controller::HTTP_OK; $data['records'] = $temp_json; @@ -2650,6 +2671,10 @@ public function getPDFormDetailsJSON_post() if(count($form_count)) { $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['status'] = REST_Controller::HTTP_OK; $data['records'] = json_decode($form_count[0]['json']); @@ -2672,6 +2697,10 @@ public function getPDFormDetailsJSON_post() $records['addresses'] = $address; $records['address_form_remark'] = ''; $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['status'] = REST_Controller::HTTP_OK; $data['records'] = $records; @@ -2702,7 +2731,8 @@ public function getPDFormDetailsJSON_post() $bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id']; 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); 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 { + + $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); foreach($result_data as $b_key => $b_value) @@ -2778,10 +2815,13 @@ public function getPDFormDetailsJSON_post() } } // 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(); // if(count($rec)) @@ -2827,6 +2867,10 @@ public function getPDFormDetailsJSON_post() } $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['status'] = REST_Controller::HTTP_OK; $data['records'] = $json;