diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 6ebd15f6..c6b88ce1 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2347,7 +2347,7 @@ class PD_Controller extends REST_Controller { } } - //die(); + // die(); /*****End of Form Specific funcitons to convert RAW JSON Data to Processed JSON DATA*******/ unset($records['pdid']); @@ -4024,11 +4024,12 @@ class PD_Controller extends REST_Controller { $fk_createdby = $records['fk_createdby']; $data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid); + $data['pd_master_details'][0]['pd_report_generated_date'] = date('d/m/Y g:i:s A'); $data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid); $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid); $data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly($pdid); $data['pd_score'] = $this->calculateScore($pdid); - $data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] ); + //$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] ); $data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid); $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],1) : 0; //echo $score_for_chart; @@ -4933,11 +4934,27 @@ class PD_Controller extends REST_Controller { public function codeigniterViewTest_post() { + // $newstring = 'Easy to locate & ReachAddress Form - Approach to PD location .'; + // //echo $newstring ; + // $start_pos = strpos($newstring,''); + + // $end_pos = strpos($newstring, '', strpos($newstring,'')); + // $end_pos = $end_pos + 14; + // //echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-'; + + // $newstring = substr_replace($newstring,'',$start_pos,($end_pos - $start_pos)); + + + // $newstring = substr_replace($newstring,'',strpos($newstring,''),(strlen(''))); + // echo $newstring; + + + // die(); $records = $this->post('records'); $pdid = $records['pd_id']; - echo $pdid;die(); + //PDALERTS::pdnotification($pdid);die(); $is_regenerate = 0; if(isset($records['regenerate'])) @@ -5015,9 +5032,35 @@ class PD_Controller extends REST_Controller { //print_r($data['pd_images']);die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true)); //die(); //echo "*******************************************"; - $t = $this->load->view('report_templates/JSONTOREPORT',$data,true); + $t = $this->load->view('report_templates/JSONTOREPORT',$data,true); + //$t = $this->load->view('temp_html.html',null,true); - echo $t; die(); + + $total_replaces = substr_count($t,''); + echo $total_replaces; + //echo $t; die(); + //echo "*************************************"; + //echo strpos($t,''); + //echo "*************************************"; + //$t = substr_replace($t,'X',strpos($t,''),strlen('')); + + // substr_replace($t,'X',strpos($t,''),strpos($t, '', strpos($t,''))); + for($i = 0 ;$i < $total_replaces;$i++) + { + $start_pos = strpos($t,''); + + $end_pos = strpos($t, '', strpos($t,'')); + $end_pos = $end_pos + 14; + //echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-'; + + $t = substr_replace($t,'',$start_pos,($end_pos - $start_pos)); + + + $t = substr_replace($t,'',strpos($t,''),(strlen(''))); + + } + //echo $t; + //die(); // if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) { // $dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE); diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf index d7343eb9..952d5bcb 100644 Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ diff --git a/api/application/helpers/assetsform_helper.php b/api/application/helpers/assetsform_helper.php index 7ba28ba1..16eab9a6 100644 --- a/api/application/helpers/assetsform_helper.php +++ b/api/application/helpers/assetsform_helper.php @@ -149,11 +149,11 @@ public static function getOthersAssetsDetails($values){ if(!strcasecmp($fetchVal['business_ownership_type'],'owned')) { - $ownership_type = strtoupper($fetchVal['business_ownership_type']); + $ownership_type = ($fetchVal['business_ownership_type']); $owned_flag++; }else if(!strcasecmp($fetchVal['business_ownership_type'],'rented')) { - $ownership_type = strtoupper($fetchVal['business_ownership_type']); + $ownership_type = ($fetchVal['business_ownership_type']); $rental_flag++; } diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php index 2a4d253d..d3414810 100644 --- a/api/application/helpers/getprocessedjson_helper.php +++ b/api/application/helpers/getprocessedjson_helper.php @@ -823,10 +823,13 @@ class GETPROCESSEDJSON $applicant_title_name = 'applicant_title_name'; $CI->db->SELECT( 'applicant_name,name as applicant_title_name'); $CI->db->FROM(PDAPPLICANTSDETAILS. ' as PDAPPLICANTSDETAILS'); - $CI->db->JOIN(TITLES .' as TITLES','PDAPPLICANTSDETAILS.applicant_title_name = TITLES.title_id'); + $CI->db->JOIN(TITLES .' as TITLES','PDAPPLICANTSDETAILS.applicant_title_name = TITLES.title_id','LEFT'); $CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$partner['partner_name']); $partner_name= $CI->db->GET()->result_array(); - //print_r($partner_name);die(); + //print_r($CI->db->last_query()); + //print_r($partner_name); + + //die(); if(count($partner_name)) { //echo $partner_name[0][$master_tables_field_names['PDAPPLICANTSDETAILS']];die(); @@ -1345,7 +1348,7 @@ class GETPROCESSEDJSON } - return $raw_json; + return ($raw_json); } /*****************########## END BUSINESS FORM DETAILS ##########**************/ diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 18291ce6..76fb7fd5 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -10,8 +10,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');