X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=reporting%2Fincludes%2Fpdf_report.inc;h=29f6a5bbd733e41ba2a47f831efe9763e821f36f;hb=e3296f859091dc27831c909375fb778903b2da9b;hp=b41bb69e867d8b4c2831dbe509868f6ef95da468;hpb=1bded8f2ef7c8c5b88bf5a6347802712a31e01e3;p=fa-stable.git diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index b41bb69e..29f6a5bb 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -341,7 +341,7 @@ class FrontReport extends Cpdf $str = $this->fiscal_year; $this->Text($titleCol, $str, $companyCol); $this->Text($companyCol, $this->user); - for ($i = 1; $i < count($this->params); $i++) + for ($i = 1; $i < count_array($this->params); $i++) { if ($this->params[$i]['from'] != '') { @@ -376,7 +376,7 @@ class FrontReport extends Cpdf $this->TextCol2($i, $i + 1, $this->headers2[$i]); $this->NewLine(); } - $count = count($this->headers); + $count = count_array($this->headers); for ($i = 0; $i < $count; $i++) $this->TextCol($i, $i + 1, $this->headers[$i]); $this->Font(); @@ -389,7 +389,7 @@ class FrontReport extends Cpdf */ function SetCommonData($myrow, $branch, $sales_order, $bankaccount, $doctype, $contacts) { - + $this->pageNumber = 0; $this->formData = array(); $datnames = array( 'myrow' => array('ord_date', 'date_', 'tran_date', @@ -952,6 +952,9 @@ class FrontReport extends Cpdf { global $SysPrefs, $path_to_root; + if (!empty($SysPrefs->prefs['print_dialog_direct'])) + $this->includeJS("print();"); // force to open print dialog + if ($SysPrefs->pdf_debug == 1) { $pdfcode = $this->Output('','S');