From: <tim...@us...> - 2010-03-01 17:38:48
|
Revision: 3364 http://web-erp.svn.sourceforge.net/web-erp/?rev=3364&view=rev Author: tim_schofield Date: 2010-03-01 17:38:42 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Tim: PrintCustTrans.php - Correctly show html and pdf formats Modified Paths: -------------- trunk/PrintCustTrans.php trunk/doc/Change.log.html Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2010-03-01 08:28:30 UTC (rev 3363) +++ trunk/PrintCustTrans.php 2010-03-01 17:38:42 UTC (rev 3364) @@ -362,20 +362,22 @@ } /* end loop to print invoices */ // Start FPDI concatination to append PDF files conditionally to the invoice // This part taken from FPDI example page -not used yet since change to TCPDF Dec 2009 -class concat_pdf extends FPDI { - var $files = array(); - function setFiles($files) { - $this->files = $files; - } - function concat() { - foreach($this->files as $file) { - if ($file != 'pdf_append/none') { - $pagecount = $this->setSourceFile($file); - for ($i = 1;$i <= $pagecount;$i++) { - $tplidx = $this->ImportPage($i); - $s = $this->getTemplatesize($tplidx); - $this->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $this->useTemplate($tplidx); +if ($PrintPDF) { + class concat_pdf extends FPDI { + var $files = array(); + function setFiles($files) { + $this->files = $files; + } + function concat() { + foreach($this->files as $file) { + if ($file != 'pdf_append/none') { + $pagecount = $this->setSourceFile($file); + for ($i = 1;$i <= $pagecount;$i++) { + $tplidx = $this->ImportPage($i); + $s = $this->getTemplatesize($tplidx); + $this->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); + $this->useTemplate($tplidx); + } } } } @@ -388,7 +390,7 @@ } elseif (isset($_POST['FromTransNo'])) { $FromTransNo = trim($_POST['FromTransNo']); } -if ($InvOrCredit == 'Invoice') { +if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and $PrintPDF=='True') { $sql = 'SELECT stockmoves.stockid, stockmaster.appendfile FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-01 08:28:30 UTC (rev 3363) +++ trunk/doc/Change.log.html 2010-03-01 17:38:42 UTC (rev 3364) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>01/03/10 Tim: PrintCustTrans.php - Correctly show html and pdf formats</p> <p>01/03/10 Pak Ricard: PDFPriceList.php - Updated price list report</p> <p>01/03/10 Harald: PcExpensesTypeTabv.php - Correct message on deletion of tab</p> <p>01/03/10 Harald: PcExpensesTypeTabv.php - Missing space</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |