SE_RI GENERIC TEMPLATE CONFIGURED

This commit is contained in:
velz 2019-03-08 12:49:24 +05:30
parent d2642ac0ee
commit 3a09807aec

View File

@ -21,17 +21,14 @@ class PD_Controller extends REST_Controller {
{
// Construct the parent class
parent::__construct();
$this->load->model('PD_Model');
$this->load->model('PD_Model');
$this->load->library('AWS_S3');
$this->load->library('AWS_SNS');
$this->load->helper('GETPDFORMDETAILS');
$this->load->helper('GETPROCESSEDJSON');
$this->load->library('pdfgenerator');
$this->load->library('pdfgenerator');
$this->load->library('excel');
$this->load->library('phpmailer_library');
//$this->load->library('pdfgen_tcpdf');
}
@ -355,6 +352,11 @@ class PD_Controller extends REST_Controller {
//* SENP/SEP - (DI)
$pd_details['fk_pd_template_id'] = 3;
}
else if($res_array[0]['fk_customer_segment'] == 8)
{
//* SENP/SEP - (RI)
$pd_details['fk_pd_template_id'] = 4;
}
}
}
@ -750,6 +752,11 @@ class PD_Controller extends REST_Controller {
//* SENP/SEP - (AI)
$pd_details['fk_pd_template_id'] = 3;
}
else if($res_array[0]['fk_customer_segment'] == 8)
{
//* SENP/SEP - (RI)
$pd_details['fk_pd_template_id'] = 4;
}
@ -2693,7 +2700,7 @@ class PD_Controller extends REST_Controller {
/*################### LOGGING #########################*/
$logger = MYLOG::logFunction();
$temp_array['pd_co_applicant_id'] = $new_co_appliacant_id;
//$temp_array['pd_co_applicant_id'] = $new_co_appliacant_id;
$logger->info("COMPANY(APPLICANT) DELETED FROM GENERAL FORM ENV (".ENVIRONMENT.")",$company);
@ -4267,6 +4274,16 @@ class PD_Controller extends REST_Controller {
public function codeigniterViewTest_post()
{
// $t = $this->load->view('report_templates/SALCASH',$data = array(),true);
// //echo $t;die();
// //PDF Gen using DOM PDF
// $pdf_doc = $this->pdfgenerator->generate($t, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
// //End of PDF Gen using DOM PDF
// $output_file2 = APPPATH."/docs/sample.pdf";
// $ti = file_put_contents($output_file2, $pdf_doc);
// echo $ti;
// die();
$records = $this->post('records');
$pdid = $records['pd_id'];
$fk_createdby = $records['fk_createdby'];
@ -4282,7 +4299,7 @@ class PD_Controller extends REST_Controller {
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
$data['pd_score'] = $this->calculateScore($pdid);
print_r($data['pd_score']);die();
//print_r($data['pd_score']);die();
//GET ALL PROCESSED JSON
for($i = 1;$i<=25;$i++)
{
@ -4306,11 +4323,11 @@ class PD_Controller extends REST_Controller {
//End of PDF Gen using DOM PDF
$output_file2 = APPPATH."/docs/sample.pdf";
$ti = file_put_contents($output_file2, $pdf_doc);
echo $ti;
// $data['dataStatus'] = true;
// $data['status'] = REST_Controller::HTTP_OK;
// $data['records'] = $ti;
// $this->response($data,REST_Controller::HTTP_OK);
//echo $ti;
$dat['dataStatus'] = true;
$dat['status'] = REST_Controller::HTTP_OK;
$dat['records'] = $ti;
$this->response($dat,REST_Controller::HTTP_OK);
@ -4627,9 +4644,15 @@ class PD_Controller extends REST_Controller {
}
else
{
$fields = array('*');
$where_condition_array = array('isactive' => 1,'fk_subproduct_id' => null);
$result_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,ENDUSEOFLOAN);
$data['dataStatus'] = false;
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
$data['msg'] = 'Sub Product Not Choosen for this PD!';
$data['records'] = $result_data;
$data['msg'] = 'Sub Product Not Applicable for this PD!';
$this->response($data,REST_Controller::HTTP_OK);
}