diff --git a/api/application/helpers/smc_creditpd_helper.php b/api/application/helpers/smc_creditpd_helper.php index 26968d14..5b04a3b4 100644 --- a/api/application/helpers/smc_creditpd_helper.php +++ b/api/application/helpers/smc_creditpd_helper.php @@ -615,7 +615,7 @@ class smc_creditpd } else { - $all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 , 'img_name !=' => 'satellite'),SMC_CREDIT_PD_DOCS); + $all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 ),SMC_CREDIT_PD_DOCS); // $all_form_names = array('pd_form_id'=>19,'pd_form_name'=>"photograph"); // $form_name[19] = "photograph"; @@ -634,7 +634,12 @@ class smc_creditpd $src_local_file = XLPATH.'/tmp/'.$doc_name.'.png'; $ifp = fopen( $src_local_file, 'wb' ); $img = explode( ',', $image['img'] ); - fwrite( $ifp, base64_decode( $img[ 1 ] ) ); + // fwrite( $ifp, base64_decode( $img[ 1 ] ) ); + if($doc_name == "satellite"){ + fwrite( $ifp, base64_decode($image['img']) ); + }else{ + fwrite( $ifp, base64_decode( $img[ 1 ] ) ); + } fclose( $ifp ); $MyFile = file_get_contents($src_local_file); $CI->zip->add_data('pdimages/'.$doc_name.'.png',$MyFile); @@ -687,7 +692,7 @@ class smc_creditpd } else { - $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS); + $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS); // $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS); $data_to_view['all_pd_images'] = $all_pd_images; diff --git a/api/application/views/report_templates/PDSMCIMG_PDF.php b/api/application/views/report_templates/PDSMCIMG_PDF.php index 758d72e1..f7f880b5 100644 --- a/api/application/views/report_templates/PDSMCIMG_PDF.php +++ b/api/application/views/report_templates/PDSMCIMG_PDF.php @@ -522,7 +522,14 @@ defined('BASEPATH') OR exit('No direct script access allowed'); { echo '