X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fpdf_report.inc;h=c475a29be608bdeafbcc8807db72efac9d40190f;hb=41fc5025878df6a2950e4356e4b6883a5efcac1a;hp=6b9b45c9f637c53b089a3a016eeefae8d93c9984;hpb=a9d55e1c13cbd6a6305b9322ec8621a06516f9f3;p=fa-stable.git diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 6b9b45c9..c475a29b 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -296,6 +296,8 @@ class FrontReport extends Cpdf // function Header() { + global $SysPrefs; + $companyCol = $this->endLine - 150; $titleCol = $this->leftMargin + 100; @@ -311,9 +313,18 @@ class FrontReport extends Cpdf $this->Text($this->leftMargin, $this->title, $companyCol); $this->Font(); $this->fontSize -= 4; - $this->Text($companyCol, $this->company['coy_name']); - $this->row -= ($this->lineHeight + 4); - + $logo = company_path() . "/images/" . $this->company['coy_logo']; + if (!empty($SysPrefs->show_company_logo_report) && $this->company['coy_logo'] != '' && file_exists($logo)) + { + $this->row -= ($this->lineHeight + 3); + $this->AddImage($logo, $companyCol, $this->row, 0, 30); + $this->row -= 6; + } + else + { + $this->Text($companyCol, $this->company['coy_name']); + $this->row -= ($this->lineHeight + 4); + } $str = _("Print Out Date") . ':'; $this->Text($this->leftMargin, $str, $titleCol); $str = Today() . ' ' . Now(); @@ -957,7 +968,7 @@ class FrontReport extends Cpdf } // do not use standard filenames or your sensitive company data // are world readable - $fname = $dir.'/'.uniqid('').'.pdf'; + $fname = $dir.'/'.random_id().'.pdf'; $this->Output($fname, 'F'); if ($email == 1)