diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index f42604ac..7a64bc88 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -56,7 +56,7 @@ class Sales_PD_Controller extends REST_Controller { $applicant_id = ''; $officer = ''; - foreach (json_decode($records['pd_json']) as $key => $value) + foreach (json_decode($records['pd_json'],true) as $key => $value) { //print_r($value);die(); if($value['section_id'] == 1) @@ -165,7 +165,7 @@ class Sales_PD_Controller extends REST_Controller { //$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr']; $view_name = $sales_pd_data[0]['short_name']; $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"); //End of PDF Gen using DOM PDF $output_file = $this->external_path ."/sales_pd/" . $sales_pd_id . "/temp.pdf"; @@ -177,7 +177,7 @@ class Sales_PD_Controller extends REST_Controller { if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) { - $this->Sales_PD_Model->updateRecords(array('is_pdf' => 1, 'is_edited' => 0),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id)); + // $this->Sales_PD_Model->updateRecords(array('is_pdf' => 1, 'is_edited' => 0),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id)); $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes'); $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; diff --git a/api/application/views/sale_pd_templates/SMC.php b/api/application/views/sale_pd_templates/SMC.php index e7d5c770..f6d3e103 100644 --- a/api/application/views/sale_pd_templates/SMC.php +++ b/api/application/views/sale_pd_templates/SMC.php @@ -1,7 +1,9 @@ ↑'; + $downarrow = '↓'; + $dash = '-'; ?>
@@ -261,7 +263,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?>| Photograph`s |
|---|
| Photograph`s |
|---|
'.$photo_names [ $p_value['name'] ].' | ';
+ if(!($iter % 3)) { echo '
| '.$photo_names [ $p_value['name'] ].' | ';
- if(!($iter % 5) && $iter != 0) { echo '