SMC SAPLED TYPE 7,8 REVOKED

This commit is contained in:
Velz2020 2019-11-15 20:19:35 +05:30
parent 2df3cff689
commit 6cd6e98058
4 changed files with 9 additions and 7 deletions

View File

@ -256,5 +256,6 @@ $route['(getRawData/:any)'] = 'Data_Dump_Controller/getRawData';
$route['loadSalesPDTemplate'] = 'Sales_PD_Controller/loadSalesPDTemplate'; $route['loadSalesPDTemplate'] = 'Sales_PD_Controller/loadSalesPDTemplate';
$route['saveSalesPD'] = 'Sales_PD_Controller/saveSalesPD'; $route['saveSalesPD'] = 'Sales_PD_Controller/saveSalesPD';
$route['(downloadSalesPDReport/:any)'] = 'Sales_PD_Controller/getSalesPDReport'; $route['(downloadSalesPDReport/:any)'] = 'Sales_PD_Controller/getSalesPDReport';
$route['(listSalesPD/:any/:any)'] = 'Sales_PD_Controller/listSalesPD'; $route['listSalesPD/(:any)'] = 'Sales_PD_Controller/listSalesPD';
$route['listSalesPD/(:any)/(:any)'] = 'Sales_PD_Controller/listSalesPD';

View File

@ -4899,7 +4899,7 @@ public function getPDFormDetailsJSON_post()
{ {
$temp_dir_name = isset($form_name[ $image['fk_form_id'] ]) ? $form_name[ $image['fk_form_id'] ] : 'Common'; $temp_dir_name = isset($form_name[ $image['fk_form_id'] ]) ? $form_name[ $image['fk_form_id'] ] : 'Common';
$this->zip->add_data('pdimages/'.$temp_dir_name.'/'.$image['pd_document_name'],file_get_contents($image['doc_url'])); $this->zip->add_data('pdimages/'.$image['pd_document_name'],file_get_contents($image['doc_url']));
} }
$temp_path = $main_applicant_name.'_'.$pdid.'_'.'pd_images.zip'; $temp_path = $main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';

View File

@ -56,7 +56,7 @@ class Sales_PD_Controller extends REST_Controller {
$applicant_id = ''; $applicant_id = '';
$officer = ''; $officer = '';
foreach ($records['pd_json'] as $key => $value) foreach (json_decode($records['pd_json']) as $key => $value)
{ {
//print_r($value);die(); //print_r($value);die();
if($value['section_id'] == 1) if($value['section_id'] == 1)
@ -161,10 +161,11 @@ class Sales_PD_Controller extends REST_Controller {
$view_data['section'.$section['section_id'] ] = $this->processSalesPDJSON($section); $view_data['section'.$section['section_id'] ] = $this->processSalesPDJSON($section);
} }
//print_r($view_data);die();
//$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr']; //$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr'];
$view_name = $sales_pd_data[0]['short_name']; $view_name = $sales_pd_data[0]['short_name'];
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true); $html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
//echo $html_content;die(); echo $html_content;die();
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait"); $pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
//End of PDF Gen using DOM PDF //End of PDF Gen using DOM PDF
$output_file = $this->external_path ."/sales_pd/" . $sales_pd_id . "/temp.pdf"; $output_file = $this->external_path ."/sales_pd/" . $sales_pd_id . "/temp.pdf";
@ -222,7 +223,7 @@ class Sales_PD_Controller extends REST_Controller {
$where_condition_array = array('SALES_PD_DATA.createdby' => $user_id); $where_condition_array = array('SALES_PD_DATA.createdby' => $user_id);
} }
$order_by = 'SALES_PD_DATA.sales_pd_id'; $order_by = 'SALES_PD_DATA.sales_pd_id';
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array); $sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array,$order_by,'DESC');
if(count($sales_pd_data)) if(count($sales_pd_data))
{ {
$data['dataStatus'] = true; $data['dataStatus'] = true;

View File

@ -93,7 +93,7 @@ class SPARQ_Model extends CI_Model {
} }
public function getJoinRecords($columns,$table,$joins,$where_condition_array = array(),$order_by = '',$print_query = '') public function getJoinRecords($columns,$table,$joins,$where_condition_array = array(),$order_by_cloumn = '',$order_by = 'ASC',$print_query = '')
{ {
@ -115,7 +115,7 @@ class SPARQ_Model extends CI_Model {
if($order_by != '') if($order_by != '')
{ {
$this->db->ORDER_BY($order_by); $this->db->ORDER_BY($order_by_cloumn,$order_by);
} }
$data = $this->db->get()->result_array(); $data = $this->db->get()->result_array();