X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fpdf_report.inc;h=8c5d5727d42d1d6e11b41f327451c2369c39f1de;hb=c4eae7a18f0eb824e6eda7be2ba6fa820e9e58c9;hp=fde0b441cdd8957286bfef2d9ad59c9dfdd30e81;hpb=a5242af68e65661edb7175412444dce536a7f311;p=fa-stable.git diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index fde0b441..8c5d5727 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -124,7 +124,7 @@ class FrontReport extends Cpdf } $this->size = array(0, 0, $this->pageWidth, $this->pageHeight); $this->title = $title; - $this->filename = $filename; + $this->filename = $filename.".pdf"; $this->pageNumber = 0; $this->endLine = $this->pageWidth - $this->rightMargin; $this->companyCol = $this->endLine - 150; @@ -319,6 +319,18 @@ class FrontReport extends Cpdf { return $this->TextWrap($this->cols[$c], $this->row - $r, $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c]); } + + function AmountCol($c, $n, $txt, $dec=0, $corr=0, $r=0) + { + return $this->TextCol($c, $n, number_format2($txt, $dec), $corr, $r); + } + + function DateCol($c, $n, $txt, $conv=false, $corr=0, $r=0) + { + if ($conv) + $txt = sql2date($txt); + return $this->TextCol($c, $n, $txt, $corr, $r); + } function TextCol2($c, $n, $txt, $corr=0, $r=0) {