From b460124c2a86977d766d99944210b56df7c01e27 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Sat, 24 Aug 2019 16:05:38 +0530 Subject: [PATCH] LIVE PD REPORT ISSUE AND SOME OTHER --- api/application/controllers/PD_Controller.php | 10 +++++----- .../helpers/neighbourreferencecheckform_helper.php | 2 +- api/application/models/PD_Model.php | 10 +++++----- api/application/views/js/phantomchart.js | 2 +- .../views/report_templates/JSONTOREPORT.php | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index e88bde74..f8d8a713 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -1973,7 +1973,7 @@ public function assignPDTempalate($data) $result_data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid); // Get All PD Related Documents - $result_data['pd_documnets'] = $this->PD_Model->getSignedPDDocsURL($pdid); + $result_data['pd_documnets'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,1); //Get All PD Template and It's Question with Answers $result_data['pd_question_answer'] = $this->PD_Model->getPDQuestionAnswers($pdid); @@ -5595,10 +5595,10 @@ public function getPDFormDetailsJSON_post() $exact_script = $phantom_script[0]['script_content']; //print_r($exact_script); - $apppath = str_replace('\\','/',APPPATH); + $apppath = str_replace('\\','/',$this->external_path.'/pd_reports/'.$pdid); $exact_script = str_replace('{{APPPATH}}',$apppath,$exact_script); $exact_script = str_replace('{{place_score_here}}',$score_for_chart,$exact_script); - $exact_script = str_replace('{{APPPATH}}',APPPATH,$exact_script); + //print_r($exact_script);die(); //GENERATE CHART PART @@ -5642,8 +5642,8 @@ public function getPDFormDetailsJSON_post() //echo "*******************************************"; $t = $this->load->view('report_templates/JSONTOREPORT',$data,true); //$t = $this->load->view('temp_html.html',null,true); - // echo $t; - // die(); + echo $t; + die(); $total_replaces = substr_count($t,''); //echo $total_replaces; diff --git a/api/application/helpers/neighbourreferencecheckform_helper.php b/api/application/helpers/neighbourreferencecheckform_helper.php index 415323e0..dc89f4e3 100644 --- a/api/application/helpers/neighbourreferencecheckform_helper.php +++ b/api/application/helpers/neighbourreferencecheckform_helper.php @@ -22,7 +22,7 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa if($tag['how_long_do_know_in_year']) { $neighbourhood_business_running_yr = $tag['neighbourhood_name']." confirmed that the business has been in operation for "; - $neighbourhood_business_running_yr .= ($tag['how_long_do_know_in_year'] == 1) ? $tag['neighbourhood_name'].' '.$tag['how_long_do_know_in_year']." year" : (($tag['how_long_do_know_in_year'] > 1) ? $tag['how_long_do_know_in_year']." years" : ""); + $neighbourhood_business_running_yr .= ($tag['how_long_do_know_in_year'] == 1) ? $tag['how_long_do_know_in_year']." year" : (($tag['how_long_do_know_in_year'] > 1) ? $tag['how_long_do_know_in_year']." years" : ""); $neighbourhood_business_running_yr .= ($tag['how_long_do_know_in_month'] == 1) ? ' and '.$tag['how_long_do_know_in_month']." month" : (($tag['how_long_do_know_in_month'] > 1) ? ' and '.$tag['how_long_do_know_in_month']." months" : ""); $neighbourhood_business_running_yr .= '.'; diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index b5779f99..e106ace3 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -871,10 +871,10 @@ class PD_Model extends SPARQ_Model { } else { - if($result_array[0]['lender_sales_person'] == "" || $result_array[0]['lender_sales_person'] == null) - { - $mandatory_fields[] = 'lender_sales_person'; - } + // if($result_array[0]['lender_sales_person'] == "" || $result_array[0]['lender_sales_person'] == null) + // { + // $mandatory_fields[] = 'lender_sales_person'; + // } if($result_array[0]['lender_credit_person'] == "" || $result_array[0]['lender_credit_person'] == null) { @@ -1902,7 +1902,7 @@ class PD_Model extends SPARQ_Model { { $this->db->select('USERPROFILE.userid, concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as user_name,USERPROFILE.fk_entity_id,USERPROFILE.fk_city,USERPROFILEROLES.user_role,USERPROFILE.fk_entity_type_id,ROLES.role_name,if( POSITION("credit" IN ROLES.role_name),"CREDIT","SALES") as role_type'); $this->db->from(USERPROFILE.' as USERPROFILE'); - $this->db->join(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH',"USERPROFILE.fk_entity_id = ENTITYLENDERBRANCH.fk_entity_id and ENTITYLENDERBRANCH.isactive = 1 and ENTITYLENDERBRANCH.fk_city_id = USERPROFILE.fk_city and ENTITYLENDERBRANCH.entity_lender_branch_id = $pd_branch_id"); + //$this->db->join(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH',"USERPROFILE.fk_entity_id = ENTITYLENDERBRANCH.fk_entity_id and ENTITYLENDERBRANCH.isactive = 1 and ENTITYLENDERBRANCH.fk_city_id = USERPROFILE.fk_city and ENTITYLENDERBRANCH.entity_lender_branch_id = $pd_branch_id"); //$this->db->join(STATE.' as STATE','USERPROFILE.fk_state = STATE.state_id and STATE.isactive = 1','LEFT'); //$this->db->join(CITY.' as CITY','USERPROFILE.fk_city = CITY.city_id and CITY.isactive = 1','LEFT'); // $this->db->join(CITY.' as CITY','USERPROFILE.fk_city = CITY.city_id and CITY.isactive = 1','LEFT'); diff --git a/api/application/views/js/phantomchart.js b/api/application/views/js/phantomchart.js index 59b8bd36..e859424b 100644 --- a/api/application/views/js/phantomchart.js +++ b/api/application/views/js/phantomchart.js @@ -1 +1 @@ -var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 56.7;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/AWSEC2/sparqapi/api/application//chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);}); \ No newline at end of file +var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 74.2;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/ssa_external_data/testing/pd_reports/1244/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);}); \ No newline at end of file diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 7e706c17..1f0bae33 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -2609,7 +2609,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $supplier_details = $pd_processed_forms[1][$business_count]; $supplierRow = json_decode($supplier_details['processed_json'],true); - + //print_r($supplierRow); $supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : ''); if(isset($supplierRow['supplier_info_available']) && $supplierRow['supplier_info_available'] == 1) @@ -2764,7 +2764,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $temp['supplier_fifth_row'] = '5Payment Terms'; - $temp['supplier_fifth_row'] .= isset($serviceRow['service_provider_payment_type_master']) ? ''. $serviceRow['trade_product_payment_type_master'] .'' : 'NA'; + $temp['supplier_fifth_row'] .= isset($serviceRow['service_provider_payment_type_master']) ? ''. $serviceRow['service_provider_payment_type_master'] .'' : 'NA'; $temp['supplier_sixth_row'] = '6Payment Mode'; @@ -2781,7 +2781,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } } // echo "dsfnsdkfnj**********"; - //print_r($supplierResult);die(); + // print_r($supplierResult);//die(); echo '

Supplier Details

' ; if($is_supplier_details_avaialable != null) @@ -3896,7 +3896,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); //echo $pd_offiecer_status_about_neighbor; if(count($existNeighRefCheck)>0){ - //print_r($existNeighRefCheck); + //print_r($existNeighRefCheck);die(); ?> $nfValue) {