projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes in POS extension related to bank account structure change.
[fa-stable.git]
/
reporting
/
includes
/
pdf_report.inc
diff --git
a/reporting/includes/pdf_report.inc
b/reporting/includes/pdf_report.inc
index 0fec40a9b406e7353def05ad8253159efcb55966..115fa929d24ab9a34469ed9bffab0707fba42b7d 100644
(file)
--- a/
reporting/includes/pdf_report.inc
+++ b/
reporting/includes/pdf_report.inc
@@
-361,7
+361,7
@@
class FrontReport extends Cpdf
if ($pdf_debug == 1)
{
if ($pdf_debug == 1)
{
- $pdfcode = $this->Output();
+ $pdfcode = $this->Output(
'','S'
);
$pdfcode = str_replace("\n", "\n<br>", htmlspecialchars($pdfcode));
echo '<html><body>';
echo trim($pdfcode);
$pdfcode = str_replace("\n", "\n<br>", htmlspecialchars($pdfcode));
echo '<html><body>';
echo trim($pdfcode);
@@
-377,8
+377,6
@@
class FrontReport extends Cpdf
else
{
else
{
- $buf = $this->Output();
- $len = strlen($buf);
$dir = $comp_path.'/'.user_company(). '/pdf_files';
//save the file
if (!file_exists($dir))
$dir = $comp_path.'/'.user_company(). '/pdf_files';
//save the file
if (!file_exists($dir))
@@
-387,12
+385,8
@@
class FrontReport extends Cpdf
}
// do not use standard filenames or your sensitive company data
// are world readable
}
// do not use standard filenames or your sensitive company data
// are world readable
- $fname = tempnam($dir, 'FA');
- rename($fname, $fname.'.pdf');
- $fname .= '.pdf';
- $fp = fopen($fname,'w');
- fwrite($fp,$buf);
- fclose($fp);
+ $fname = $dir.'/'.uniqid('').'.pdf';
+ $this->Output($fname, 'F');
if ($email == 1)
{
$emailtype = true;
if ($email == 1)
{
$emailtype = true;