IMAGE PDF
This commit is contained in:
parent
a24f5ed4e8
commit
991d39e0f5
@ -4845,7 +4845,7 @@ public function getPDFormDetailsJSON_post()
|
||||
$pdid = $records['pd_id'];
|
||||
$random_string = $records['random_string'];
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($pdid,$random_string);
|
||||
|
||||
set_time_limit(60);
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pdid))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pdid,0777);
|
||||
@ -4883,8 +4883,13 @@ public function getPDFormDetailsJSON_post()
|
||||
// }
|
||||
$data_to_view['all_pd_images'] = $all_pd_images;
|
||||
$img_pdf_data = $this->load->view('report_templates/PDIMG_PDF',$data_to_view,true);
|
||||
print_r($img_pdf_data);die();
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>($this->external_path.'/pd_reports/'.$pdid.'/'.$temp_path));
|
||||
//print_r($img_pdf_data);die();
|
||||
$pdf_doc = $this->pdfgenerator->generate($img_pdf_data, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
//End of PDF Gen using DOM PDF
|
||||
$output_file2 = $this->external_path ."/pd_reports/" . $pdid . "/pd_images_pdf.pdf";
|
||||
$ti = file_put_contents($output_file2, $pdf_doc);
|
||||
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>($output_file2));
|
||||
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
//print_r($s3result);
|
||||
@ -4894,7 +4899,7 @@ public function getPDFormDetailsJSON_post()
|
||||
$where_condition_array = array("pd_id" => $pdid);
|
||||
$temp_array['is_zip_created'] = 1;
|
||||
$id = $this->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array);
|
||||
- unlink($this->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||
unlink($output_file2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1146,7 +1146,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo !($employeement_data['total_business_experience'] == $employeement_data['how_long_year'])? ("<p>Out of ".$employeement_data['total_business_experience']." Yr(s) of total experience, t") :"<p>T";
|
||||
echo "he applicant has served ". $employeement_data['how_long_year'] ." Years ".($employeement_data['how_long_month'] ? ' and '.$employeement_data['how_long_month'].' months' : '' )." as employee in this firm." ;
|
||||
echo $employeement_data['total_business_previous_experience'] ? ("<br>Previous Work Experience : ".$employeement_data['total_business_previous_experience']) : '';echo "</p>";
|
||||
echo "<p>During PD visit, ". ($employeement_data['was_met'] == 'no'? 'the employer was not met.' : $employeement_data['name_person_met'].' '.$employeement_data['designation_person_met'] .' of the firm has been met');
|
||||
echo "<p>During PD visit, ". ($employeement_data['was_met'] == 'no'? 'the employer was not met.' : $employeement_data['name_person_met'].' '.$employeement_data['designation_person_met_master'] .' the firm has been met');
|
||||
echo ($employeement_data['confirm_salary'] == 'no'? ' and salary amount was not confirmed because '.$employeement_data['sal_amount_was_not_confirmed'] : ' and '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).' ('.(MYUTIL::numtowords($employeement_data['confirm_salary_amount'])).') was confirmed as salary.');
|
||||
if($employeement_data['attendance_seen'] == $employeement_data['sal_reg_seen'] )
|
||||
{
|
||||
@ -1184,7 +1184,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo $employeement_data['net_monthly_salary'] == 'Yes' ? 'there is a delay in salary payment.' : 'Generally there is no delay in salary payment.';
|
||||
echo "</p><p>";
|
||||
|
||||
echo $employeement_data['bonus_incentive'] ? "The applicant receives a bonus ( ".($employeement_data['bonus_type'] == 'others' ? $employeement_data['bonus_type_other']: $employeement_data['bonus_type']).") of ".$rupee_symbol." ".MYUTIL::customIndianNumberFormat($employeement_data['bonus_incentive'])." ( " .MYUTIL::numtowords($employeement_data['bonus_incentive']).") "." ".$employeement_data['bonus_frequency'].'.': '';
|
||||
echo $employeement_data['bonus_incentive'] ? "The applicant receives a bonus ( ".($employeement_data['bonus_type'] == 'others' ? $employeement_data['bonus_type_other']: $employeement_data['bonus_type']).") of ".$rupee_symbol." ".MYUTIL::customIndianNumberFormat($employeement_data['bonus_incentive'])." ( " .MYUTIL::numtowords($employeement_data['bonus_incentive']).") "." ".$employeement_data['bonus_frequency_master'].'.': '';
|
||||
echo "</p>";
|
||||
echo "<p>".$employeement_data['id_card_issued_company'] == 'yes' ? 'ID card issued by employer was seen by PD officer.(image attatched end of the report)': 'ID card issued by employer was not seen by PD officer.'."</p>";
|
||||
//echo "<br>***********************************";
|
||||
|
||||
@ -502,19 +502,19 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//$all_pd_images_count = count($all_pd_images);
|
||||
|
||||
$img_row_count = ceil(count($all_pd_images) / 3);
|
||||
|
||||
if(count($all_pd_images)){
|
||||
echo '<br>';
|
||||
echo '<p>PD Photograph`s :</p>';
|
||||
echo '<br>';
|
||||
echo '<table border="1" height="100%" width="50%">';
|
||||
|
||||
$add_factor = 0;
|
||||
for($img_row = 0; $img_row < $img_row_count; $img_row++)
|
||||
{
|
||||
if($img_row > 0) { break; }
|
||||
//if($img_row > 0) { break; }
|
||||
echo '<tr>';
|
||||
$from = $img_row == 0 ? $img_row : ($img_row+2);
|
||||
$from = $img_row == 0 ? $img_row : ($img_row+$add_factor);
|
||||
$to = ($from + 2);
|
||||
$add_factor = $add_factor + 2;
|
||||
for($photo_iter = $from; $photo_iter <= $to;$photo_iter++)
|
||||
{
|
||||
|
||||
@ -526,7 +526,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '<div class="desc">'.$all_pd_images[$photo_iter]['pd_document_title'] .'</div>';
|
||||
echo '</div>';
|
||||
echo '</td>';
|
||||
unset($all_pd_images[$photo_iter]);
|
||||
// unset($all_pd_images[$photo_iter]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user