X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fexcel_report.inc;h=ecffc7d3bba2401636e441d2cb46a76cb8c162ed;hb=9e60b200d22656e6d9d795c36d78f8ac9de7c47b;hp=4fd129b7926f246e61394ac3aa66927488c23eb9;hpb=49d2702ed98abe7a564a4abb4c8c5fa225f362e8;p=fa-stable.git diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index 4fd129b7..ecffc7d3 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -58,7 +58,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function FrontReport($title, $filename, $size = 'A4', $fontsize = 9, $orientation = 'P', $margins = NULL, $excelColWidthFactor = 6.5) { - global $comp_path, $dateseps, $page_security; + global $dateseps, $page_security; if (!$_SESSION["wa_current_user"]->can_access_page($page_security)) { display_error(_("The security settings on your account do not permit you to print this report")); @@ -71,14 +71,14 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook $this->endLine = 760; $this->fontSize = $fontsize; $this->oldFontSize = 0; - $this->y = 1; + $this->y = 0; $this->currency = ''; $this->excelColWidthFactor = $excelColWidthFactor; $rtl = ($_SESSION['language']->dir == 'rtl'); $this->code = strtolower($_SESSION['language']->encoding); $this->filename = $filename.".xls"; $this->unique_name = uniqid('').".xls"; - $this->path = $comp_path.'/'.user_company(). '/pdf_files'; + $this->path = company_path(). '/pdf_files'; $this->Spreadsheet_Excel_Writer_Workbook($this->path."/".$this->unique_name); //$this->setCountry(48); if ($this->code != "iso-8859-1") @@ -237,7 +237,6 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function Header() { - $this->y = 0; $tcol = $this->numcols - 1; $this->sheet->setRow($this->y, 20); for ($i = 0; $i < $this->numcols; $i++) @@ -524,6 +523,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function TextCol($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0) { + $txt = html_entity_decode($txt); if ($this->aligns[$c] == 'right') $this->sheet->writeString($this->y, $c, $txt, $this->formatRight); else @@ -557,6 +557,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function TextCol2($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0) { + $txt = html_entity_decode($txt); $this->sheet->writeString($this->y, $c, $txt, $this->formatLeft); if ($n - $c > 1) $this->sheet->mergeCells($this->y, $c, $this->y, $n - 1); @@ -630,7 +631,12 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook { $this->y += $l; } - + + function NewPage() + { + return; + } + function ymd2Date($year, $mon, $day) // XLS internal date representation is a number between 1900-01-01 and 2078-12-31 { // if we need the time part too, we have to add this value after a decimalpoint. $mo = array(0,31,28,31,30,31,30,31,31,30,31,30,31);