diff --git a/api/application/controllers/Flyhi_Controller.php b/api/application/controllers/Flyhi_Controller.php index a499447d..4a7a44b4 100644 --- a/api/application/controllers/Flyhi_Controller.php +++ b/api/application/controllers/Flyhi_Controller.php @@ -639,8 +639,8 @@ class Flyhi_Controller extends REST_Controller { $records = $this->post('records'); $lender_id = $records['lender_id']; // $product = $records['product_id']; - $flyhi_pd_type = $records['sales_pd_type'] ? $records['sales_pd_type'] : null; - $product = $records['product_id']; + $flyhi_pd_type = isset($records['sales_pd_type']) ? $records['sales_pd_type'] : null; + $product = isset($records['product_id']) ? $records['product_id'] : null; $pd_type = 2; if(isset($records['pd_type'])){ $pd_type = $records['pd_type'];} $template = $this->Flyhi_Model->selectCustomRecords(array('*'),array('lender_id' => $lender_id,'pd_type' => $pd_type,'sales_pd_type' => $flyhi_pd_type,'isactive' => 1),SALESPDTEMPLATE); @@ -932,6 +932,17 @@ class Flyhi_Controller extends REST_Controller { $questions["lender_abbr"] = $result_data[0]['short_name']; } } + if($ques_key == 'relationship_with_applicant' && !empty($ques_value)){ + $table = RELATIONSHIPS; + $fields = array('relationship_id','name'); + $where_condition_array = array('relationship_id'=>$ques_value); + $result_data = $this->Flyhi_Model->selectCustomRecords($fields,$where_condition_array,$table); + if(count($result_data)) + { + $new_key = $ques_key . '_master'; + $questions[$new_key] = $result_data[0]['name']; + } + } if($ques_key == 'branch' && !empty($ques_value)){ $table = ENTITYLENDERBRANCH; @@ -2198,7 +2209,7 @@ class Flyhi_Controller extends REST_Controller { public function regenerateFlyhiReport_get(){ $sales_pd_id = $this->get('sales_pd_id'); if(!empty($sales_pd_id)){ - $this->Sales_PD_Model->updateRecords(array('is_pdf' => 0),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id)); + $this->Flyhi_Model->updateRecords(array('is_pdf' => 0),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id)); log_message('ERROR','####Manually Called - Report Generated Flyhi pd = '.$sales_pd_id); $this->prepareFlyhiPDReport($sales_pd_id);} else{ diff --git a/api/application/views/sale_pd_templates/FHFSL.php b/api/application/views/sale_pd_templates/FHFSL.php index 4fcf1637..68a1cb65 100644 --- a/api/application/views/sale_pd_templates/FHFSL.php +++ b/api/application/views/sale_pd_templates/FHFSL.php @@ -342,7 +342,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');