From: Joe Hunt Date: Mon, 26 Apr 2010 08:32:48 +0000 (+0000) Subject: Allowing the Tax Report to be printed to Excel/OO Calc X-Git-Tag: 2.3-final~918 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b2d74dd9702a3bedea66cc832033a21c9ed59c45;p=fa-stable.git Allowing the Tax Report to be printed to Excel/OO Calc --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b7a86e2b..f732a28c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,12 @@ Legend: ! -> Note $ -> Affected files +26-Apr-2010 Joe Hunt +! Allowing the Tax Report to be printed to Excel/OO Calc +$ /reporting/rep709.php + /reports_main.php + /reporting/includes/excel_report.inc + 21-Apr-2010 Joe Hunt # [0000223] Incorrect backup of tables with more than 2 digit prefix $ /admin/db/maintenance_db.inc diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index f9065cea..4f8dbc6a 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -70,7 +70,7 @@ 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'); @@ -236,7 +236,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++) diff --git a/reporting/rep709.php b/reporting/rep709.php index 3fc4c637..29fbc025 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -77,8 +77,12 @@ function print_tax_report() $to = $_POST['PARAM_1']; $summaryOnly = $_POST['PARAM_2']; $comments = $_POST['PARAM_3']; + $destination = $_POST['PARAM_4']; - include_once($path_to_root . "/reporting/includes/pdf_report.inc"); + if ($destination) + include_once($path_to_root . "/reporting/includes/excel_report.inc"); + else + include_once($path_to_root . "/reporting/includes/pdf_report.inc"); $dec = user_price_dec(); @@ -165,11 +169,14 @@ function print_tax_report() $aligns2 = array('left', 'right', 'right', 'right', 'right', 'right', 'right'); - for ($i = 0; $i < count($cols2); $i++) - $rep->cols[$i] = $rep->leftMargin + $cols2[$i]; + $rep->Info($params, $cols2, $headers2, $aligns2); + + //for ($i = 0; $i < count($cols2); $i++) + // $rep->cols[$i] = $rep->leftMargin + $cols2[$i]; - $rep->headers = $headers2; - $rep->aligns = $aligns2; + //$rep->numcols = count($headers2); + //$rep->headers = $headers2; + //$rep->aligns = $aligns2; $rep->Header(); $taxtotal = 0; diff --git a/reporting/reports_main.php b/reporting/reports_main.php index 5bc356a1..31767cc0 100644 --- a/reporting/reports_main.php +++ b/reporting/reports_main.php @@ -361,7 +361,8 @@ $reports->addReport(_('General Ledger'),709,_('Ta&x Report'), array( _('Start Date') => 'DATEBEGINTAX', _('End Date') => 'DATEENDTAX', _('Summary Only') => 'YES_NO', - _('Comments') => 'TEXTBOX')); + _('Comments') => 'TEXTBOX', + _('Destination') => 'DESTINATION')); $reports->addReport(_('General Ledger'),710,_('Audit Trail'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM',