Implemented Selectable Print Orientation (Portrait, Landscape) for all reports in...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 17 Jan 2013 00:29:23 +0000 (01:29 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 17 Jan 2013 00:29:23 +0000 (01:29 +0100)
47 files changed:
config.default.php
includes/current_user.inc
manufacturing/work_order_entry.php
reporting/includes/reporting.inc
reporting/includes/reports_classes.inc
reporting/prn_redirect.php
reporting/rep101.php
reporting/rep102.php
reporting/rep103.php
reporting/rep104.php
reporting/rep105.php
reporting/rep106.php
reporting/rep107.php
reporting/rep108.php
reporting/rep109.php
reporting/rep110.php
reporting/rep111.php
reporting/rep112.php
reporting/rep113.php
reporting/rep114.php
reporting/rep201.php
reporting/rep202.php
reporting/rep203.php
reporting/rep204.php
reporting/rep209.php
reporting/rep210.php
reporting/rep301.php
reporting/rep302.php
reporting/rep303.php
reporting/rep304.php
reporting/rep305.php
reporting/rep306.php
reporting/rep401.php
reporting/rep409.php
reporting/rep501.php
reporting/rep601.php
reporting/rep701.php
reporting/rep702.php
reporting/rep704.php
reporting/rep705.php
reporting/rep706.php
reporting/rep707.php
reporting/rep708.php
reporting/rep709.php
reporting/rep710.php
reporting/reports_main.php
update.html

index 2139177603e240a96dbca66a58049088bd3d8f48..56b5c88e755bee8a642bd7a131b9eed0ca34126a 100644 (file)
@@ -109,6 +109,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_
        /* default print destination. 0 = PDF/Printer, 1 = Excel */
        $def_print_destination = 0;
 
+       /* default print orientation. 0 = Portrait, 1 = Landscape */
+       $def_print_orientation = 0;
+
        // Wiki context help configuration
        // If your help wiki use translated page titles uncomment next line
        // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions
index e393252d72cb4c7302443f4a077d2ceeb3b8a116..7f04eb778329e347b017f0523ad4d67f0eb2d68c 100644 (file)
@@ -610,6 +610,14 @@ function array_search_key($needle, $haystack, $valuekey=null)
        return @$keys[0];
 }
 
+// Recalculate report columns if orientation is landscape.
+function recalculate_cols(&$cols)
+{
+       $factor = (user_pagesize() == "A4" ? 1.4 : 1.3);
+       foreach($cols as $key => $col)
+               $cols[$key] = intval($col * $factor); 
+}
+
 function flush_dir($path, $wipe = false) 
 {
        $dir = opendir($path);
index ce96abaa43743aa1647798fd634fb82898e5ab61..f5e90d10c55ed299bd5920610911a3912880b072 100644 (file)
@@ -53,17 +53,17 @@ if (isset($_GET['AddedID']))
 
        display_notification_centered(_("The work order been added."));
 
-    display_note(get_trans_view_str($stype, $id, _("View this Work Order")));
+    display_note(get_trans_view_str($stype, $id, _("View this Work Order")), 0, 1);
 
        if ($_GET['type'] != WO_ADVANCED)
        {
                include_once($path_to_root . "/reporting/includes/reporting.inc");
-       $ar = array('PARAM_0' => $id, 'PARAM_1' => $id, 'PARAM_2' => 0); 
-       display_note(print_link(_("Print this Work Order"), 409, $ar), 1);
-       $ar['PARAM_2'] = 1;
-       display_note(print_link(_("Email this Work Order"), 409, $ar), 1);
+
+               submenu_print(_("&Print This Work Order"), ST_WORKORDER, $id, 'prtopt');
+               submenu_print(_("&Email This Work Order"), ST_WORKORDER, $id, null, 1);
        display_note(get_gl_view_str($stype, $id, _("View the GL Journal Entries for this Work Order")), 1);
-       $ar = array('PARAM_0' => $_GET['date'], 'PARAM_1' => $_GET['date'], 'PARAM_2' => $stype); 
+       $ar = array('PARAM_0' => $_GET['date'], 'PARAM_1' => $_GET['date'], 'PARAM_2' => $stype, 'PARAM_3' => '',
+               'PARAM_4' => (isset($def_print_orientation) && $def_print_orientation == 1 ? 1 : 0)); 
        display_note(print_link(_("Print the GL Journal Entries for this Work Order"), 702, $ar), 1);
                hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=$stype&trans_no=$id");
        }
index 8dc119f6629dbd1cb924bf5aec88a44264511c8e..6acc7d32355e6a6b7623509776cd16a15bd09c53 100644 (file)
 function print_document_link($doc_no, $link_text, $link=true, $type_no, 
        $icon=false, $class='printlink', $id='', $email=0, $extra=0)
 {
-       global $path_to_root;
+       global $path_to_root, $def_print_orientation;
        include_once($path_to_root . "/includes/types.inc");
 
        $url = $path_to_root.'/reporting/prn_redirect.php?';
+       $def_orientation = (isset($def_print_orientation) && $def_print_orientation == 1 ? 1 : 0);
 
        switch ($type_no)
        {
                case ST_SALESQUOTE :
                        $rep = 111;
-                       // from, to, currency, bank acc, email, quote, comments
+                       // from, to, currency, email, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => '', 
                                'PARAM_3' => $email, 
-                               'PARAM_4' => '');
+                               'PARAM_4' => '',
+                               'PARAM_5' => $def_orientation);
                        break;
                case ST_SALESORDER :
                        $rep = 109;
-                       // from, to, currency, bank acc, email, quote, comments
+                       // from, to, currency, email, quote, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => '', 
                                'PARAM_3' => $email, 
                                'PARAM_4' => 0, 
-                               'PARAM_5' => '');
+                               'PARAM_5' => '',
+                               'PARAM_6' => $def_orientation);
                        break;
                case ST_CUSTDELIVERY :
                        $rep = 110;
-                       // from, to, email, comments
+                       // from, to, email, packing slip, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => $email,
-                               'PARAM_3' => $extra);
+                               'PARAM_3' => $extra,
+                               'PARAM_4' => '',
+                               'PARAM_5' => $def_orientation);
                        break;
                case ST_SALESINVOICE : // Sales Invoice
                case ST_CUSTCREDIT : // Customer Credit Note
                        $rep = $type_no==ST_CUSTCREDIT ? 113 : 107;
-                       // from, to, currency, bank acc, email, paylink, comments, type
+                       // from, to, currency, email, paylink, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
@@ -65,46 +70,49 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no,
                                'PARAM_3' => $email, 
                                'PARAM_4' => '',
                                'PARAM_5' => '', 
-                               'PARAM_6' => $type_no);
+                               'PARAM_6' => $def_orientation);
                        break;
                case ST_PURCHORDER :
                        $rep = 209;
-                       // from, to, currency, bank acc, email, comments
+                       // from, to, currency, email, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => '', 
                                'PARAM_3' => $email, 
-                               'PARAM_4' => '');
+                               'PARAM_4' => '',
+                               'PARAM_5' => $def_orientation);
                        break;
                case ST_CUSTPAYMENT :
                        $rep = 112;
-                       // from, to, currency, bank acc, email, comments
+                       // from, to, currency, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => '', 
-                               'PARAM_4' => '');
+                               'PARAM_3' => '',
+                               'PARAM_4' => $def_orientation);
                        break;
                case ST_SUPPAYMENT :
                        $rep = 210;
-                       // from, to, currency, bank acc, email, comments
+                       // from, to, currency, email, comments, orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => '', 
                                'PARAM_3' => $email, 
-                               'PARAM_4' => '');
+                               'PARAM_4' => '',
+                               'PARAM_5' => $def_orientation);
                        break;
                case ST_WORKORDER :
                        $rep = 409;
-                       // from, to, currency, bank acc, email, comments
+                       // from, to, email, comments orientation
                        $ar = array(
                                'PARAM_0' => $doc_no, 
                                'PARAM_1' => $doc_no, 
                                'PARAM_2' => $email, 
                                'PARAM_3' => '', 
-                               'PARAM_4' => '');
+                               'PARAM_4' => $def_orientation);
                        break;
 //             default: $ar = array();
        }
index 1ba0b1b1ff46096ad4a049bd20b73b73cd848d2e..fdb8a17561e50956ca7e81c38f3cf5e773b0898b 100644 (file)
@@ -165,7 +165,7 @@ class BoxReports
        function get_ctrl($name, $type)
        {
                global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no,
-                       $def_print_destination, $type_shortcuts;
+                       $def_print_destination, $def_print_orientation, $type_shortcuts;
 
                $st = '';
                        switch ($type)
@@ -234,6 +234,13 @@ class BoxReports
                                                $def = 1;
                                        return array_selector($name, $def, $sel);
 
+                               case 'ORIENTATION':
+                                       $sel = array(_("Portrait"), _("Landscape"));
+                                       $def = 0;
+                                       if (isset($def_print_orientation) && $def_print_orientation == 1)
+                                               $def = 1;
+                                       return array_selector($name, $def, $sel);
+
                                case 'COMPARE':
                                        $sel = array(_("Accumulated"), _("Period Y-1"), _("Budget"));
                                        return array_selector($name, null, $sel);
index 855df012b55241560714f9a97a2aeb9f0ed34790..d7147a7f5c89c50097dc0c3639b84378c8c0394d 100644 (file)
@@ -19,7 +19,7 @@ $page_security = 'SA_OPEN';   // this level is later overriden in rep file
 include_once($path_to_root . "/includes/session.inc");
 
 if (isset($save_report_selections) && $save_report_selections > 0 && isset($_POST['REP_ID'])) {        // save parameters from Report Center
-       for($i=0; $i<10; $i++) { // 2010-10-06 Joe Hunt
+       for($i=0; $i<12; $i++) { // 2013-01-16 Joe Hunt
                if (isset($_POST['PARAM_'.$i]) && !is_array($_POST['PARAM_'.$i])) {
                        $rep = $_POST['REP_ID'];
                        setcookie("select[$rep][$i]", $_POST['PARAM_'.$i], time()+60*60*24*$save_report_selections); // days from $save_report_selections
index 0ff78c8ba7bb569df8b8be90f7608560ab292cf3..2826c94be51ab415f49197166e7945e7eabd3daf 100644 (file)
@@ -102,12 +102,14 @@ function print_customer_balances()
        $currency = $_POST['PARAM_3'];
        $no_zeros = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
-       $destination = $_POST['PARAM_6'];
+       $orientation = $_POST['PARAM_6'];
+       $destination = $_POST['PARAM_7'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($fromcust == ALL_TEXT)
                $cust = _('All');
        else
@@ -138,7 +140,9 @@ function print_customer_balances()
                                    3 => array('text' => _('Currency'), 'from' => $currency, 'to' => ''),
                                                4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => ''));
 
-    $rep = new FrontReport(_('Customer Balances'), "CustomerBalances", user_pagesize());
+    $rep = new FrontReport(_('Customer Balances'), "CustomerBalances", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
     $rep->NewPage();
index f4ec4a88ea4909e548d80329a1de208537143eae..beea87bcae78a995e0d93ec27de278231c2318b2 100644 (file)
@@ -79,11 +79,13 @@ function print_aged_customer_analysis()
        $no_zeros = $_POST['PARAM_5'];
        $graphics = $_POST['PARAM_6'];
        $comments = $_POST['PARAM_7'];
-       $destination = $_POST['PARAM_8'];
+       $orientation = $_POST['PARAM_8'];
+       $destination = $_POST['PARAM_9'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
        if ($graphics)
        {
                include_once($path_to_root . "/reporting/includes/class.graphic.inc");
@@ -135,8 +137,10 @@ function print_aged_customer_analysis()
 
        if ($convert)
                $headers[2] = _('Currency');
-       $rep = new FrontReport(_('Aged Customer Analysis'), "AgedCustomerAnalysis", user_pagesize());
-
+    $rep = new FrontReport(_('Aged Customer Analysis'), "AgedCustomerAnalysis", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
     $rep->NewPage();
index 3a5fa14493a632f9e2dc20a1c0b7dee8dfd04129..fcdd07336e9e7dc5843ff72559da525014b02729 100644 (file)
@@ -98,12 +98,14 @@ function print_customer_details_listing()
     $more = $_POST['PARAM_3'];
     $less = $_POST['PARAM_4'];
     $comments = $_POST['PARAM_5'];
-       $destination = $_POST['PARAM_6'];
+       $orientation = $_POST['PARAM_6'];
+       $destination = $_POST['PARAM_7'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
     $dec = 0;
 
        if ($area == ALL_NUMERIC)
@@ -144,7 +146,9 @@ function print_customer_details_listing()
                                    3 => array('text' => _('Sales Folk'),               'from' => $salesfolk,   'to' => ''),
                                    4 => array('text' => _('Activity'),                 'from' => $morestr,     'to' => $lessstr));
 
-    $rep = new FrontReport(_('Customer Details Listing'), "CustomerDetailsListing", user_pagesize());
+    $rep = new FrontReport(_('Customer Details Listing'), "CustomerDetailsListing", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index a9bec54ba2115c1e61c30dc8908d324f9216f868..ebca98df461373b4595d7eeccc504a707b164171 100644 (file)
@@ -74,12 +74,14 @@ function print_price_listing()
     $pictures = $_POST['PARAM_3'];
     $showGP = $_POST['PARAM_4'];
     $comments = $_POST['PARAM_5'];
-       $destination = $_POST['PARAM_6'];
+       $orientation = $_POST['PARAM_6'];
+       $destination = $_POST['PARAM_7'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
     $dec = user_price_dec();
 
        $home_curr = get_company_pref('curr_default');
@@ -121,7 +123,9 @@ function print_price_listing()
        else
                $user_comp = "";
 
-    $rep = new FrontReport(_('Price Listing'), "PriceListing", user_pagesize());
+    $rep = new FrontReport(_('Price Listing'), "PriceListing", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 70c8c0d0a203cac7bb1aaf90d28ea15033ef9dfe..cccf289f05dcf496eedc139e93672ae9ba43a487 100644 (file)
@@ -79,11 +79,13 @@ function print_order_status_list()
        $location = $_POST['PARAM_3'];
        $backorder = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
-       $destination = $_POST['PARAM_6'];
+       $orientation = $_POST['PARAM_6'];
+       $destination = $_POST['PARAM_7'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
 
        if ($category == ALL_NUMERIC)
                $category = 0;
@@ -118,10 +120,12 @@ function print_order_status_list()
                                        3 => array(  'text' => _('Location'), 'from' => $loc, 'to' => ''),
                                        4 => array(  'text' => _('Selection'),'from' => $back,'to' => ''));
 
-       $cols2 = $cols;
        $aligns2 = $aligns;
 
-       $rep = new FrontReport(_('Order Status Listing'), "OrderStatusListing", user_pagesize());
+       $rep = new FrontReport(_('Order Status Listing'), "OrderStatusListing", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
+       $cols2 = $cols;
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
 
index ca1c84725b1b7a8bc07dabf96f6cf5331c1e92c4..c8a5538533278bb0ad3273d03b28881915256d8d 100644 (file)
@@ -63,11 +63,13 @@ function print_salesman_list()
        $to = $_POST['PARAM_1'];
        $summary = $_POST['PARAM_2'];
        $comments = $_POST['PARAM_3'];
-       $destination = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_4'];
+       $destination = $_POST['PARAM_5'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
 
        if ($summary == 0)
                $sum = _("No");
@@ -90,10 +92,12 @@ function print_salesman_list()
                                        1 => array(  'text' => _('Period'), 'from' => $from, 'to' => $to),
                                        2 => array(  'text' => _('Summary Only'),'from' => $sum,'to' => ''));
 
-       $cols2 = $cols;
        $aligns2 = $aligns;
 
-       $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize());
+       $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
+       $cols2 = $cols;
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
 
index 5e044f2898df54935a36d3daf75de299c4b10cde..19f590ede16052e0eb9c7ac48153d4e0a045021a 100644 (file)
@@ -42,9 +42,11 @@ function print_invoices()
        $email = $_POST['PARAM_3'];
        $pay_service = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_6'];
 
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $fno = explode("-", $from);
@@ -62,13 +64,9 @@ function print_invoices()
        $cur = get_company_Pref('curr_default');
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_('INVOICE'), "InvoiceBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+               $rep = new FrontReport(_('INVOICE'), "InvoiceBulk", user_pagesize(), 9, $orientation);
+       if ($orientation == 'L')
+               recalculate_cols($cols);
        for ($i = $from; $i <= $to; $i++)
        {
                        if (!exists_customer_trans(ST_SALESINVOICE, $i))
@@ -82,16 +80,15 @@ function print_invoices()
                        $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER);
                        if ($email == 1)
                        {
-                               $rep = new FrontReport("", "", user_pagesize());
-                           $rep->SetHeaderType('Header2');
-                               $rep->currency = $cur;
-                               $rep->Font();
+                               $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                                $rep->title = _('INVOICE');
                                $rep->filename = "Invoice" . $myrow['reference'] . ".pdf";
-                               $rep->Info($params, $cols, null, $aligns);
-                       }
-                       else
-                               $rep->title = _('INVOICE');
+                       }       
+                       $rep->SetHeaderType('Header2');
+                       $rep->currency = $cur;
+                       $rep->Font();
+                       $rep->Info($params, $cols, null, $aligns);
+
                        $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no'], false);
                        $baccount['payment_service'] = $pay_service;
                        $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_SALESINVOICE, $contacts);
index 9315f64974eba83aca3751cdd2561cc8c3c56acf..a64a71b05d5322b53af4b8f2cb1c0dacc243d750 100644 (file)
@@ -64,7 +64,9 @@ function print_statements()
        $show_also_allocated = $_POST['PARAM_2'];
        $email = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_5'];
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $cols = array(4, 100, 130, 190, 250, 320, 385, 450, 515);
@@ -80,14 +82,10 @@ function print_statements()
        $PastDueDays2 = 2 * $PastDueDays1;
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_('STATEMENT'), "StatementBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
-
+               $rep = new FrontReport(_('STATEMENT'), "StatementBulk", user_pagesize(), 9, $orientation);
+   if ($orientation == 'L')
+       recalculate_cols($cols);
        $sql = "SELECT debtor_no, name AS DebtorName, address, tax_id, curr_code, curdate() AS tran_date FROM ".TB_PREF."debtors_master";
        if ($customer != ALL_TEXT)
                $sql .= " WHERE debtor_no = ".db_escape($customer);
@@ -108,14 +106,15 @@ function print_statements()
                        continue;
                if ($email == 1)
                {
-                       $rep = new FrontReport("", "", user_pagesize());
-                       $rep->SetHeaderType('Header2');
-                       $rep->currency = $cur;
-                       $rep->Font();
+                       $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                        $rep->title = _('STATEMENT');
                        $rep->filename = "Statement" . $myrow['debtor_no'] . ".pdf";
-                       $rep->Info($params, $cols, null, $aligns);
-               }
+               }       
+               $rep->SetHeaderType('Header2');
+               $rep->currency = $cur;
+               $rep->Font();
+               $rep->Info($params, $cols, null, $aligns);
+
                $contacts = get_customer_contacts($myrow['debtor_no'], 'invoice');
                //= get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']);
                $rep->SetCommonData($myrow, null, null, $baccount, ST_STATEMENT, $contacts);
index c8b4a1ef3e782f8ac34fc86df9d67742fa5d13e0..0497392fba0f0cb6df11a3e5cdad3b5b53b2e24d 100644 (file)
@@ -43,11 +43,11 @@ function print_sales_orders()
        $email = $_POST['PARAM_3'];
        $print_as_quote = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_6'];
 
-       if ($from == null)
-               $from = 0;
-       if ($to == null)
-               $to = 0;
+       if (!$from || !$to) return;
+
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $cols = array(4, 60, 225, 300, 325, 385, 450, 515);
@@ -62,14 +62,12 @@ function print_sales_orders()
        if ($email == 0)
        {
                if ($print_as_quote == 0)
-                       $rep = new FrontReport(_("SALES ORDER"), "SalesOrderBulk", user_pagesize());
+                       $rep = new FrontReport(_("SALES ORDER"), "SalesOrderBulk", user_pagesize(), 9, $orientation);
                else
-                       $rep = new FrontReport(_("QUOTE"), "QuoteBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
+                       $rep = new FrontReport(_("QUOTE"), "QuoteBulk", user_pagesize(), 9, $orientation);
        }
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        for ($i = $from; $i <= $to; $i++)
        {
@@ -79,10 +77,7 @@ function print_sales_orders()
                $branch = get_branch($myrow["branch_code"]);
                if ($email == 1)
                {
-                       $rep = new FrontReport("", "", user_pagesize());
-                       $rep->SetHeaderType('Header2');
-                       $rep->currency = $cur;
-                       $rep->Font();
+                       $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                        if ($print_as_quote == 1)
                        {
                                $rep->title = _('QUOTE');
@@ -93,10 +88,13 @@ function print_sales_orders()
                                $rep->title = _("SALES ORDER");
                                $rep->filename = "SalesOrder" . $i . ".pdf";
                        }
-                       $rep->Info($params, $cols, null, $aligns);
                }
                else
                        $rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER"));
+               $rep->SetHeaderType('Header2');
+               $rep->currency = $cur;
+               $rep->Font();
+               $rep->Info($params, $cols, null, $aligns);
 
                $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], false);
                $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts);
index 7b9318d0e845ac9ecd2920aa87580bb3d5456b78..69457665fa19911d929f2afb9ac8ba2d8c6d458d 100644 (file)
@@ -43,9 +43,11 @@ function print_deliveries()
        $email = $_POST['PARAM_2'];
        $packing_slip = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_5'];
 
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $fno = explode("-", $from);
@@ -65,15 +67,12 @@ function print_deliveries()
        if ($email == 0)
        {
                if ($packing_slip == 0)
-                       $rep = new FrontReport(_('DELIVERY'), "DeliveryNoteBulk", user_pagesize());
+                       $rep = new FrontReport(_('DELIVERY'), "DeliveryNoteBulk", user_pagesize(), 9, $orientation);
                else
-                       $rep = new FrontReport(_('PACKING SLIP'), "PackingSlipBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
+                       $rep = new FrontReport(_('PACKING SLIP'), "PackingSlipBulk", user_pagesize(), 9, $orientation);
        }
-
+    if ($orientation == 'L')
+       recalculate_cols($cols);
        for ($i = $from; $i <= $to; $i++)
        {
                        if (!exists_customer_trans(ST_CUSTDELIVERY, $i))
@@ -83,10 +82,7 @@ function print_deliveries()
                        $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER); // ?
                        if ($email == 1)
                        {
-                               $rep = new FrontReport("", "", user_pagesize());
-                               $rep->SetHeaderType('Header2');
-                               $rep->currency = $cur;
-                               $rep->Font();
+                               $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                                if ($packing_slip == 0)
                                {
                                        $rep->title = _('DELIVERY NOTE');
@@ -97,10 +93,12 @@ function print_deliveries()
                                        $rep->title = _('PACKING SLIP');
                                        $rep->filename = "Packing_slip" . $myrow['reference'] . ".pdf";
                                }
-                               $rep->Info($params, $cols, null, $aligns);
                        }
-                       else
-                               $rep->title = _('DELIVERY NOTE');
+                       $rep->SetHeaderType('Header2');
+                       $rep->currency = $cur;
+                       $rep->Font();
+                       $rep->Info($params, $cols, null, $aligns);
+
                        $contacts = get_branch_contacts($branch['branch_code'], 'delivery', $branch['debtor_no'], false);
                        $rep->SetCommonData($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY, $contacts);
                        $rep->NewPage();
index 2662fca59d1221403d0a4cdff2785a063b24c8ac..89ef41d2149ec3ca430e3d70f9d39b7e8d5a93c8 100644 (file)
@@ -40,11 +40,11 @@ function print_sales_quotations()
        $currency = $_POST['PARAM_2'];
        $email = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_5'];
 
-       if ($from == null)
-               $from = 0;
-       if ($to == null)
-               $to = 0;
+       if (!$from || !$to) return;
+
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $cols = array(4, 60, 225, 300, 325, 385, 450, 515);
@@ -57,13 +57,9 @@ function print_sales_quotations()
        $cur = get_company_Pref('curr_default');
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_("SALES QUOTATION"), "SalesQuotationBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+               $rep = new FrontReport(_("SALES QUOTATION"), "SalesQuotationBulk", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        for ($i = $from; $i <= $to; $i++)
        {
@@ -73,17 +69,17 @@ function print_sales_quotations()
                $branch = get_branch($myrow["branch_code"]);
                if ($email == 1)
                {
-                       $rep = new FrontReport("", "", user_pagesize());
-                       $rep->SetHeaderType('Header2');
-                       $rep->currency = $cur;
-                       $rep->Font();
+                       $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                        if ($print_invoice_no == 1)
                                $rep->filename = "SalesQuotation" . $i . ".pdf";
                        else    
                                $rep->filename = "SalesQuotation" . $myrow['reference'] . ".pdf";
-                       $rep->Info($params, $cols, null, $aligns);
                }
-               $rep->title = _("SALES QUOTATION");
+               $rep->SetHeaderType('Header2');
+               $rep->currency = $cur;
+               $rep->Font();
+               $rep->Info($params, $cols, null, $aligns);
+
                $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], false);
                $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts);
                //$rep->headerFunc = 'Header2';
index ba6c94653b4571ccf24f83b4ff94a1294ad7efd4..cb8ca5fec8c7736693cd518518804fb31c2c6c85 100644 (file)
@@ -70,9 +70,11 @@ function print_receipts()
        $to = $_POST['PARAM_1'];
        $currency = $_POST['PARAM_2'];
        $comments = $_POST['PARAM_3'];
+       $orientation = $_POST['PARAM_4'];
 
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $fno = explode("-", $from);
@@ -89,8 +91,10 @@ function print_receipts()
 
        $cur = get_company_Pref('curr_default');
 
-       $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize());
-       $rep->SetHeaderType('Header2');
+       $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
+       if ($orientation == 'L')
+       recalculate_cols($cols);
+       $rep->SetHeaderType('Header2');
        $rep->currency = $cur;
        $rep->Font();
        $rep->Info($params, $cols, null, $aligns);
@@ -110,7 +114,6 @@ function print_receipts()
                        $baccount = db_fetch($res);
                        $params['bankaccount'] = $baccount['bank_act'];
 
-                       $rep->title = _('RECEIPT');
                        $contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']);
                        $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT, $contacts);
                        $rep->NewPage();
index aec634e25f3da7d65e1b562d3766d7451011240a..ed5cc705cc6a40534fe0f772bd65c4a72ad4e8fb 100644 (file)
@@ -42,9 +42,11 @@ function print_credits()
        $email = $_POST['PARAM_3'];
        $paylink = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_6'];
 
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $fno = explode("-", $from);
@@ -62,13 +64,9 @@ function print_credits()
        $cur = get_company_Pref('curr_default');
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_('CREDIT NOTE'), "InvoiceBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+               $rep = new FrontReport(_('CREDIT NOTE'), "InvoiceBulk", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        for ($i = $from; $i <= $to; $i++)
        {
@@ -84,16 +82,15 @@ function print_credits()
                        $sales_order = null;
                        if ($email == 1)
                        {
-                               $rep = new FrontReport("", "", user_pagesize());
-                           $rep->SetHeaderType('Header2');
-                               $rep->currency = $cur;
-                               $rep->Font();
+                               $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                                $rep->title = _('CREDIT NOTE');
                                $rep->filename = "CreditNote" . $myrow['reference'] . ".pdf";
-                               $rep->Info($params, $cols, null, $aligns);
                        }
-                       else
-                               $rep->title = _('CREDIT NOTE');
+                   $rep->SetHeaderType('Header2');
+                       $rep->currency = $cur;
+                       $rep->Font();
+                       $rep->Info($params, $cols, null, $aligns);
+
                        $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no'], false);
                        $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_CUSTCREDIT, $contacts);
                        $rep->NewPage();
index 1b555d6c3b06bf7b178c166623be64427647272e..55cb289911bb1a8b058da8ffafe26d808db40282 100644 (file)
@@ -68,7 +68,8 @@ function print_sales_summary_report()
        $to = $_POST['PARAM_1'];
        $tax_id = $_POST['PARAM_2'];
        $comments = $_POST['PARAM_3'];
-       $destination = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_4'];
+       $destination = $_POST['PARAM_5'];
        if ($tax_id == 0)
                $tid = _('No');
        else
@@ -79,10 +80,11 @@ function print_sales_summary_report()
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
 
        $dec = user_price_dec();
 
-       $rep = new FrontReport(_('Sales Summary Report'), "SalesSummaryReport", user_pagesize());
+       $rep = new FrontReport(_('Sales Summary Report'), "SalesSummaryReport", user_pagesize(), 9, $orientation);
 
        $params =   array(      0 => $comments,
                                                1 => array('text' => _('Period'), 'from' => $from, 'to' => $to),
@@ -92,6 +94,9 @@ function print_sales_summary_report()
 
        $headers = array(_('Customer'), _('Tax Id'), _('Total ex. Tax'), _('Tax'));
        $aligns = array('left', 'left', 'right', 'right');
+    if ($orientation == 'L')
+       recalculate_cols($cols);
+
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
        $rep->NewPage();
index 4004c8a219c335bb279198fb0ff014c5e721bd08..8131e164e1daa6eb9450a6e437bf982878068987 100644 (file)
@@ -90,12 +90,14 @@ function print_supplier_balances()
        $currency = $_POST['PARAM_3'];
        $no_zeros = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
-       $destination = $_POST['PARAM_6'];
+       $orientation = $_POST['PARAM_6'];
+       $destination = $_POST['PARAM_7'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($fromsupp == ALL_TEXT)
                $supp = _('All');
        else
@@ -126,7 +128,9 @@ function print_supplier_balances()
                        3 => array(  'text' => _('Currency'),'from' => $currency, 'to' => ''),
                        4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => ''));
 
-    $rep = new FrontReport(_('Supplier Balances'), "SupplierBalances", user_pagesize());
+    $rep = new FrontReport(_('Supplier Balances'), "SupplierBalances", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 6bbf6d92c02fb1f53f13d0a559bfe49a6b373b88..7ba8b0d7733ad3d5dcc53d1d3d36789af5ba74b6 100644 (file)
@@ -82,12 +82,14 @@ function print_aged_supplier_analysis()
     $no_zeros = $_POST['PARAM_5'];
     $graphics = $_POST['PARAM_6'];
     $comments = $_POST['PARAM_7'];
-       $destination = $_POST['PARAM_8'];
+       $orientation = $_POST['PARAM_8'];
+       $destination = $_POST['PARAM_9'];
 
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
        if ($graphics)
        {
                include_once($path_to_root . "/reporting/includes/class.graphic.inc");
@@ -140,7 +142,9 @@ function print_aged_supplier_analysis()
 
        if ($convert)
                $headers[2] = _('currency');
-       $rep = new FrontReport(_('Aged Supplier Analysis'), "AgedSupplierAnalysis", user_pagesize());
+    $rep = new FrontReport(_('Aged Supplier Analysis'), "AgedSupplierAnalysis", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 7ca090d9d043fef8cfa88aad3550104cdb889b38..c1784e51cf6af19d0a05ab0aa3773b3670b45614 100644 (file)
@@ -62,12 +62,14 @@ function print_payment_report()
        $currency = $_POST['PARAM_2'];
        $no_zeros = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
-       $destination = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_5'];
+       $destination = $_POST['PARAM_6'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($fromsupp == ALL_TEXT)
                $from = _('All');
        else
@@ -99,7 +101,9 @@ function print_payment_report()
                        3 => array(  'text' => _('Currency'),'from' => $currency, 'to' => ''),
                        4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => ''));
 
-    $rep = new FrontReport(_('Payment Report'), "PaymentReport", user_pagesize());
+    $rep = new FrontReport(_('Payment Report'), "PaymentReport", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 21624cf489481b56811fff5291f4c426b4082212..3dbe96fa6a7110f25463d6f61cd19d3931d966eb 100644 (file)
@@ -65,12 +65,14 @@ function print_outstanding_GRN()
 
     $fromsupp = $_POST['PARAM_0'];
     $comments = $_POST['PARAM_1'];
-       $destination = $_POST['PARAM_2'];
+       $orientation = $_POST['PARAM_2'];
+       $destination = $_POST['PARAM_3'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($fromsupp == ALL_TEXT)
                $from = _('All');
        else
@@ -87,7 +89,9 @@ function print_outstanding_GRN()
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('Supplier'), 'from' => $from, 'to' => ''));
 
-    $rep = new FrontReport(_('Outstanding GRNs Report'), "OutstandingGRN", user_pagesize());
+    $rep = new FrontReport(_('Outstanding GRNs Report'), "OutstandingGRN", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 343f9f7dee5f35dcdbaecdde094e85e6aa31703d..c1632dfd1f1745f869ddff7d90c467af7055bbd8 100644 (file)
@@ -67,11 +67,11 @@ function print_po()
        $currency = $_POST['PARAM_2'];
        $email = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_5'];
 
-       if ($from == null)
-               $from = 0;
-       if ($to == null)
-               $to = 0;
+       if (!$from || !$to) return;
+
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $cols = array(4, 60, 225, 300, 340, 385, 450, 515);
@@ -84,13 +84,9 @@ function print_po()
        $cur = get_company_Pref('curr_default');
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_('PURCHASE ORDER'), "PurchaseOrderBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+               $rep = new FrontReport(_('PURCHASE ORDER'), "PurchaseOrderBulk", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        for ($i = $from; $i <= $to; $i++)
        {
@@ -100,16 +96,15 @@ function print_po()
 
                if ($email == 1)
                {
-                       $rep = new FrontReport("", "", user_pagesize());
-                       $rep->SetHeaderType('Header2');
-                       $rep->currency = $cur;
-                       $rep->Font();
+                       $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                        $rep->title = _('PURCHASE ORDER');
                        $rep->filename = "PurchaseOrder" . $i . ".pdf";
-                       $rep->Info($params, $cols, null, $aligns);
-               }
-               else
-                       $rep->title = _('PURCHASE ORDER');
+               }       
+               $rep->SetHeaderType('Header2');
+               $rep->currency = $cur;
+               $rep->Font();
+               $rep->Info($params, $cols, null, $aligns);
+
                $contacts = get_supplier_contacts($myrow['supplier_id'], 'order');
                $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_PURCHORDER, $contacts);
                $rep->NewPage();
index 136f0d2c9fe355b542fc8dd06cbad64d5f112d27..de184220d10c7941ee764926a1b0afef0f341d96 100644 (file)
@@ -70,9 +70,11 @@ function print_remittances()
        $currency = $_POST['PARAM_2'];
        $email = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_5'];
 
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $fno = explode("-", $from);
@@ -90,13 +92,9 @@ function print_remittances()
        $cur = get_company_Pref('curr_default');
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_('REMITTANCE'), "RemittanceBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+               $rep = new FrontReport(_('REMITTANCE'), "RemittanceBulk", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        for ($i = $from; $i <= $to; $i++)
        {
@@ -115,16 +113,15 @@ function print_remittances()
 
                        if ($email == 1)
                        {
-                               $rep = new FrontReport("", "", user_pagesize());
-                               $rep->SetHeaderType('Header2');
-                               $rep->currency = $cur;
-                               $rep->Font();
+                               $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                                $rep->title = _('REMITTANCE');
                                $rep->filename = "Remittance" . $i . ".pdf";
-                               $rep->Info($params, $cols, null, $aligns);
                        }
-                       else
-                               $rep->title = _('REMITTANCE');
+                       $rep->SetHeaderType('Header2');
+                       $rep->currency = $cur;
+                       $rep->Font();
+                       $rep->Info($params, $cols, null, $aligns);
+
                        $contacts = get_supplier_contacts($myrow['supplier_id'], 'invoice');
                        $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_SUPPAYMENT, $contacts);
                        $rep->NewPage();
index 36093b1b7c4bf5289f7e9a5a97b676bb29dd60b1..5ad1735cb31cb5d2630ca1a0207ce6b4d79a775f 100644 (file)
@@ -76,7 +76,8 @@ function print_inventory_valuation_report()
     $location = $_POST['PARAM_2'];
     $detail = $_POST['PARAM_3'];
     $comments = $_POST['PARAM_4'];
-       $destination = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_5'];
+       $destination = $_POST['PARAM_6'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
@@ -84,6 +85,7 @@ function print_inventory_valuation_report()
        $detail = !$detail;
     $dec = user_price_dec();
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($category == ALL_NUMERIC)
                $category = 0;
        if ($category == 0)
@@ -109,8 +111,9 @@ function print_inventory_valuation_report()
                                    2 => array('text' => _('Category'), 'from' => $cat, 'to' => ''),
                                    3 => array('text' => _('Location'), 'from' => $loc, 'to' => ''));
 
-    $rep = new FrontReport(_('Inventory Valuation Report'), "InventoryValReport", user_pagesize());
-
+    $rep = new FrontReport(_('Inventory Valuation Report'), "InventoryValReport", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
     $rep->NewPage();
index cdeae91dc7e4be8c7e5ca383afbdfa0a77635a25..68ad88532dc6439bac3720fbe80e908b771696cd 100644 (file)
@@ -91,12 +91,14 @@ function print_inventory_planning()
     $category = $_POST['PARAM_0'];
     $location = $_POST['PARAM_1'];
     $comments = $_POST['PARAM_2'];
-       $destination = $_POST['PARAM_3'];
+       $orientation = $_POST['PARAM_3'];
+       $destination = $_POST['PARAM_4'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($category == ALL_NUMERIC)
                $category = 0;
        if ($category == 0)
@@ -129,7 +131,9 @@ function print_inventory_planning()
                                    1 => array('text' => _('Category'), 'from' => $cat, 'to' => ''),
                                    2 => array('text' => _('Location'), 'from' => $loc, 'to' => ''));
 
-    $rep = new FrontReport(_('Inventory Planning Report'), "InventoryPlanning", user_pagesize());
+    $rep = new FrontReport(_('Inventory Planning Report'), "InventoryPlanning", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index a7beebc1988b1ba5b0a39a83b44acc6a18be8b63..9c2a493bdf9831300e726c8a88d6605997358003 100644 (file)
@@ -71,13 +71,15 @@ function print_stock_check()
        $shortage = $_POST['PARAM_4'];
        $no_zeros = $_POST['PARAM_5'];
        $comments = $_POST['PARAM_6'];
-               $destination = $_POST['PARAM_7'];
+               $orientation = $_POST['PARAM_7'];
+               $destination = $_POST['PARAM_8'];
 
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        if ($category == ALL_NUMERIC)
                $category = 0;
        if ($category == 0)
@@ -128,7 +130,9 @@ function print_stock_check()
        else
                $user_comp = "";
 
-       $rep = new FrontReport(_('Stock Check Sheets'), "StockCheckSheet", user_pagesize());
+       $rep = new FrontReport(_('Stock Check Sheets'), "StockCheckSheet", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 054a12d613b19c1d90c10d32bf6599151b8d1699..9febce1c819bb600fc0aa7956a26bdd14708fea3 100644 (file)
@@ -82,12 +82,14 @@ function print_inventory_sales()
     $location = $_POST['PARAM_3'];
     $fromcust = $_POST['PARAM_4'];
        $comments = $_POST['PARAM_5'];
-       $destination = $_POST['PARAM_6'];
+       $orientation = $_POST['PARAM_6'];
+       $destination = $_POST['PARAM_7'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
     $dec = user_price_dec();
 
        if ($category == ALL_NUMERIC)
@@ -121,7 +123,9 @@ function print_inventory_sales()
                                    3 => array('text' => _('Location'), 'from' => $loc, 'to' => ''),
                                    4 => array('text' => _('Customer'), 'from' => $fromc, 'to' => ''));
 
-    $rep = new FrontReport(_('Inventory Sales Report'), "InventorySalesReport", user_pagesize());
+    $rep = new FrontReport(_('Inventory Sales Report'), "InventorySalesReport", user_pagesize(), 9, $orientation);
+       if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 0ebcbb2d080ecf41510be6a9c729dae11ea8ea4d..6dbee37bad651952fb926c5f48c4d9c03664528f 100644 (file)
@@ -86,13 +86,15 @@ function print_grn_valuation()
        $from = $_POST['PARAM_0'];
        $to = $_POST['PARAM_1'];
        $comments = $_POST['PARAM_2'];
-       $destination = $_POST['PARAM_3'];
+       $orientation = $_POST['PARAM_3'];
+       $destination = $_POST['PARAM_4'];
        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();
+       $orientation = ($orientation ? 'L' : 'P');
+       $dec = user_price_dec();
 
        $cols = array(0, 75, 225, 260, 295, 330, 370, 410, 455, 515);
        $headers = array(_('Stock ID'), _('Description'), _('PO No'), _('GRN')."#", _('Inv')."#", _('Qty'), _('Inv Price'), _('PO Price'), _('Total'));
@@ -102,7 +104,9 @@ function print_grn_valuation()
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('Period'),'from' => $from, 'to' => $to));
 
-    $rep = new FrontReport(_('GRN Valuation Report'), "GRNValuationReport", user_pagesize());
+    $rep = new FrontReport(_('GRN Valuation Report'), "GRNValuationReport", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 44da654b0adccd91611a3992496bec1ec9c0a678..92eb08fc5819000e4ff154de5cb2fbc231e027d0 100644 (file)
@@ -104,12 +104,14 @@ function print_inventory_purchase()
     $fromsupp = $_POST['PARAM_4'];
     $item = $_POST['PARAM_5'];
        $comments = $_POST['PARAM_6'];
-       $destination = $_POST['PARAM_7'];
+       $orientation = $_POST['PARAM_7'];
+       $destination = $_POST['PARAM_8'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
     $dec = user_price_dec();
 
        if ($category == ALL_NUMERIC)
@@ -149,7 +151,9 @@ function print_inventory_purchase()
                                    4 => array('text' => _('Supplier'), 'from' => $froms, 'to' => ''),
                                    5 => array('text' => _('Item'), 'from' => $itm, 'to' => ''));
 
-    $rep = new FrontReport(_('Inventory Purchasing Report'), "InventoryPurchasingReport", user_pagesize());
+    $rep = new FrontReport(_('Inventory Purchasing Report'), "InventoryPurchasingReport", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 341c2247a6655562c764e09d178f917de72bb363..0471486b577d68f7bbdbb132fa10e4b5c20098af 100644 (file)
@@ -58,12 +58,14 @@ function print_bill_of_material()
     $frompart = $_POST['PARAM_0'];
     $topart = $_POST['PARAM_1'];
     $comments = $_POST['PARAM_2'];
-       $destination = $_POST['PARAM_3'];
+       $orientation = $_POST['PARAM_3'];
+       $destination = $_POST['PARAM_4'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        $cols = array(0, 50, 305, 375, 445,     515);
 
        $headers = array(_('Component'), _('Description'), _('Loc'), _('Wrk Ctr'), _('Quantity'));
@@ -73,7 +75,9 @@ function print_bill_of_material()
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('Component'), 'from' => $frompart, 'to' => $topart));
 
-    $rep = new FrontReport(_('Bill of Material Listing'), "BillOfMaterial", user_pagesize());
+    $rep = new FrontReport(_('Bill of Material Listing'), "BillOfMaterial", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index a57974260ce9c0f28b7f8d5fd0609b940a1f667a..20f9dae488d9a076cad80e8498a3853254d310a6 100644 (file)
@@ -36,9 +36,12 @@ function print_workorders()
        $to = $_POST['PARAM_1'];
        $email = $_POST['PARAM_2'];
        $comments = $_POST['PARAM_3'];
+       $orientation = $_POST['PARAM_4'];
+
 
        if (!$from || !$to) return;
 
+       $orientation = ($orientation ? 'L' : 'P');
        $fno = explode("-", $from);
        $tno = explode("-", $to);
        $from = min($fno[0], $tno[0]);
@@ -54,13 +57,9 @@ function print_workorders()
        $cur = get_company_Pref('curr_default');
 
        if ($email == 0)
-       {
-               $rep = new FrontReport(_('WORK ORDER'), "WorkOrderBulk", user_pagesize());
-               $rep->SetHeaderType('Header2');
-               $rep->currency = $cur;
-               $rep->Font();
-               $rep->Info($params, $cols, null, $aligns);
-       }
+               $rep = new FrontReport(_('WORK ORDER'), "WorkOrderBulk", user_pagesize(), 9, $orientation);
+       if ($orientation == 'L')
+       recalculate_cols($cols);
 
        for ($i = $from; $i <= $to; $i++)
        {
@@ -70,16 +69,14 @@ function print_workorders()
                $date_ = sql2date($myrow["date_"]);
                if ($email == 1)
                {
-                       $rep = new FrontReport("", "", user_pagesize());
-                       $rep->SetHeaderType('Header2');
-                       $rep->currency = $cur;
-                       $rep->Font();
-                               $rep->title = _('WORK ORDER');
-                               $rep->filename = "WorkOrder" . $myrow['wo_ref'] . ".pdf";
-                       $rep->Info($params, $cols, null, $aligns);
-               }
-               else
+                       $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                        $rep->title = _('WORK ORDER');
+                       $rep->filename = "WorkOrder" . $myrow['wo_ref'] . ".pdf";
+               }
+               $rep->SetHeaderType('Header2');
+               $rep->currency = $cur;
+               $rep->Font();
+               $rep->Info($params, $cols, null, $aligns);
 
                $contact = array('email' =>$myrow['email'],'lang' => $dflt_lang, // ???
                        'name' => $myrow['contact'], 'name2' => '', 'contact');
index 22c00c34855850075c00726ff2a5649d32decf3d..e8a21a23cfcc2572df0317ad600965909d4a84dd 100644 (file)
@@ -74,12 +74,14 @@ function print_dimension_summary()
     $todim = $_POST['PARAM_1'];
     $showbal = $_POST['PARAM_2'];
     $comments = $_POST['PARAM_3'];
-       $destination = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_4'];
+       $destination = $_POST['PARAM_5'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        $cols = array(0, 50, 210, 250, 320, 395, 465,   515);
 
        $headers = array(_('Reference'), _('Name'), _('Type'), _('Date'), _('Due Date'), _('Closed'), _('YTD'));
@@ -89,7 +91,9 @@ function print_dimension_summary()
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('Dimension'), 'from' => get_dimension_string($fromdim), 'to' => get_dimension_string($todim)));
 
-    $rep = new FrontReport(_('Dimension Summary'), "DimensionSummary", user_pagesize());
+    $rep = new FrontReport(_('Dimension Summary'), "DimensionSummary", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 4690ac615981c8d97287a28cbb8798abf1f99274..56a53c353ae2c9047aa0d0e2bf8ee6cba809a5b2 100644 (file)
@@ -61,13 +61,15 @@ function print_bank_transactions()
        $to = $_POST['PARAM_2'];
        $zero = $_POST['PARAM_3'];
        $comments = $_POST['PARAM_4'];
-       $destination = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_5'];
+       $destination = $_POST['PARAM_6'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
-       $rep = new FrontReport(_('Bank Statement'), "BankStatement", user_pagesize());
+       $orientation = ($orientation ? 'L' : 'P');
+       $rep = new FrontReport(_('Bank Statement'), "BankStatement", user_pagesize(), 9, $orientation);
        $dec = user_price_dec();
 
        $cols = array(0, 90, 110, 170, 225, 350, 400, 460, 520);
@@ -83,6 +85,8 @@ function print_bank_transactions()
            1 => array('text' => _('Period'), 'from' => $from, 'to' => $to),
            2 => array('text' => _('Bank Account'),'from' => $act,'to' => ''));
 
+    if ($orientation == 'L')
+       recalculate_cols($cols);
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
        $rep->NewPage();
index 30e6aa05595ae67b6a58affc4482625bcae367da..d03942ffadbbf9b01c45c0b363da760c1375f941 100644 (file)
@@ -96,12 +96,14 @@ function print_Chart_of_Accounts()
 
        $showbalance = $_POST['PARAM_0'];
        $comments = $_POST['PARAM_1'];
-       $destination = $_POST['PARAM_2'];
+       $orientation = $_POST['PARAM_2'];
+       $destination = $_POST['PARAM_3'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = 0;
 
        $cols = array(0, 50, 300, 425, 500);
@@ -112,7 +114,9 @@ function print_Chart_of_Accounts()
        
        $params = array(0 => $comments);
 
-       $rep = new FrontReport(_('Chart of Accounts'), "ChartOfAccounts", user_pagesize());
+       $rep = new FrontReport(_('Chart of Accounts'), "ChartOfAccounts", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
        
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
index c2b287710d5b38eaff0a7c62cc76049b7a9e9b6e..d32c787e55ad52d456317447c583c356d820f479 100644 (file)
@@ -38,12 +38,14 @@ function print_list_of_journal_entries()
     $to = $_POST['PARAM_1'];
     $systype = $_POST['PARAM_2'];
     $comments = $_POST['PARAM_3'];
-       $destination = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_4'];
+       $destination = $_POST['PARAM_5'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
     $dec = user_price_dec();
 
     $cols = array(0, 100, 240, 300, 400, 460, 520, 580);
@@ -59,7 +61,9 @@ function print_list_of_journal_entries()
                                                $systype == -1 ? _('All') : $systypes_array[$systype],
                             'to' => ''));
 
-    $rep = new FrontReport(_('List of Journal Entries'), "JournalEntries", user_pagesize());
+    $rep = new FrontReport(_('List of Journal Entries'), "JournalEntries", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index e8063a82a1d7174284d1355ee1ff08c713e64235..45ed714ab2fefdc31dba4353863449810b7d8055 100644 (file)
@@ -46,25 +46,29 @@ function print_GL_transactions()
                $dimension = $_POST['PARAM_4'];
                $dimension2 = $_POST['PARAM_5'];
                $comments = $_POST['PARAM_6'];
-               $destination = $_POST['PARAM_7'];
+               $orientation = $_POST['PARAM_7'];
+               $destination = $_POST['PARAM_8'];
        }
        else if ($dim == 1)
        {
                $dimension = $_POST['PARAM_4'];
                $comments = $_POST['PARAM_5'];
-               $destination = $_POST['PARAM_6'];
+               $orientation = $_POST['PARAM_6'];
+               $destination = $_POST['PARAM_7'];
        }
        else
        {
                $comments = $_POST['PARAM_4'];
-               $destination = $_POST['PARAM_5'];
+               $orientation = $_POST['PARAM_5'];
+               $destination = $_POST['PARAM_6'];
        }
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
 
-       $rep = new FrontReport(_('GL Account Transactions'), "GLAccountTransactions", user_pagesize());
+       $rep = new FrontReport(_('GL Account Transactions'), "GLAccountTransactions", user_pagesize(), 9, $orientation);
        $dec = user_price_dec();
 
   //$cols = array(0, 80, 100, 150, 210, 280, 340, 400, 450, 510, 570);
@@ -109,6 +113,8 @@ function print_GL_transactions()
                                    1 => array('text' => _('Period'), 'from' => $from, 'to' => $to),
                                    2 => array('text' => _('Accounts'),'from' => $fromacc,'to' => $toacc));
     }
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
index 258307430f687146a95a03a33ea9274b49252a1f..395a68d34d531b142525083bfb3a6beb91049971 100644 (file)
@@ -175,7 +175,8 @@ function print_annual_expense_breakdown()
                $dimension2 = $_POST['PARAM_2'];
                $tags = (isset($_POST['PARAM_3']) ? $_POST['PARAM_3'] : -1);
                $comments = $_POST['PARAM_4'];
-               $destination = $_POST['PARAM_5'];
+               $orientation = $_POST['PARAM_5'];
+               $destination = $_POST['PARAM_6'];
        }
        else if ($dim == 1)
        {
@@ -183,20 +184,23 @@ function print_annual_expense_breakdown()
                $dimension = $_POST['PARAM_1'];
                $tags = (isset($_POST['PARAM_2']) ? $_POST['PARAM_2'] : -1);
                $comments = $_POST['PARAM_3'];
-               $destination = $_POST['PARAM_4'];
+               $orientation = $_POST['PARAM_4'];
+               $destination = $_POST['PARAM_5'];
        }
        else
        {
                $year = $_POST['PARAM_0'];
                $tags = (isset($_POST['PARAM_1']) ? $_POST['PARAM_1'] : -1);
                $comments = $_POST['PARAM_2'];
-               $destination = $_POST['PARAM_3'];
+               $orientation = $_POST['PARAM_3'];
+               $destination = $_POST['PARAM_4'];
        }
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = 1;
        //$pdec = user_percent_dec();
 
@@ -271,7 +275,9 @@ function print_annual_expense_breakdown()
                                'to' => ''));
     }
 
-       $rep = new FrontReport(_('Annual Expense Breakdown'), "AnnualBreakDown", user_pagesize());
+       $rep = new FrontReport(_('Annual Expense Breakdown'), "AnnualBreakDown", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
index 8a0e4d459c60bdac2f50db7607a3490781c8842a..ebb9cd8328416852d555f88b0dac053dc731adda 100644 (file)
@@ -142,7 +142,8 @@ function print_balance_sheet()
                $decimals = $_POST['PARAM_5'];
                $graphics = $_POST['PARAM_6'];
                $comments = $_POST['PARAM_7'];
-               $destination = $_POST['PARAM_8'];
+               $orientation = $_POST['PARAM_8'];
+               $destination = $_POST['PARAM_9'];
        }
        else if ($dim == 1)
        {
@@ -151,7 +152,8 @@ function print_balance_sheet()
                $decimals = $_POST['PARAM_4'];
                $graphics = $_POST['PARAM_5'];
                $comments = $_POST['PARAM_6'];
-               $destination = $_POST['PARAM_7'];
+               $orientation = $_POST['PARAM_7'];
+               $destination = $_POST['PARAM_8'];
        }
        else
        {
@@ -159,12 +161,14 @@ function print_balance_sheet()
                $decimals = $_POST['PARAM_3'];
                $graphics = $_POST['PARAM_4'];
                $comments = $_POST['PARAM_5'];
-               $destination = $_POST['PARAM_6'];
+               $orientation = $_POST['PARAM_6'];
+               $destination = $_POST['PARAM_7'];
        }
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
        if ($graphics)
        {
                include_once($path_to_root . "/reporting/includes/class.graphic.inc");
@@ -208,7 +212,9 @@ function print_balance_sheet()
                                    2 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => ''));
     }
 
-       $rep = new FrontReport(_('Balance Sheet'), "BalanceSheet", user_pagesize());
+       $rep = new FrontReport(_('Balance Sheet'), "BalanceSheet", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
        $rep->NewPage();
index 211e504fe473aa04a68eca5a7cd2d4de2f09d60a..64dea035bcb8ea83522bbd47fb88e158a5d916c6 100644 (file)
@@ -166,7 +166,8 @@ function print_profit_and_loss_statement()
                $decimals = $_POST['PARAM_6'];
                $graphics = $_POST['PARAM_7'];
                $comments = $_POST['PARAM_8'];
-               $destination = $_POST['PARAM_9'];
+               $orientation = $_POST['PARAM_9'];
+               $destination = $_POST['PARAM_10'];
        }
        else if ($dim == 1)
        {
@@ -175,7 +176,8 @@ function print_profit_and_loss_statement()
                $decimals = $_POST['PARAM_5'];
                $graphics = $_POST['PARAM_6'];
                $comments = $_POST['PARAM_7'];
-               $destination = $_POST['PARAM_8'];
+               $orientation = $_POST['PARAM_8'];
+               $destination = $_POST['PARAM_9'];
        }
        else
        {
@@ -183,12 +185,14 @@ function print_profit_and_loss_statement()
                $decimals = $_POST['PARAM_4'];
                $graphics = $_POST['PARAM_5'];
                $comments = $_POST['PARAM_6'];
-               $destination = $_POST['PARAM_7'];
+               $orientation = $_POST['PARAM_7'];
+               $destination = $_POST['PARAM_8'];
        }
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
        if ($graphics)
        {
                include_once($path_to_root . "/reporting/includes/class.graphic.inc");
@@ -251,7 +255,9 @@ function print_profit_and_loss_statement()
                $headers[3] = _('Period Y-1');
        }
 
-       $rep = new FrontReport(_('Profit and Loss Statement'), "ProfitAndLoss", user_pagesize());
+       $rep = new FrontReport(_('Profit and Loss Statement'), "ProfitAndLoss", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
index 979ca2e1e4a45bffa0d9e871a8627e209f11b8b7..8aba3eb168ab263406a4a3763852b37d5f28800b 100644 (file)
@@ -147,23 +147,27 @@ function print_trial_balance()
                $dimension = $_POST['PARAM_4'];
                $dimension2 = $_POST['PARAM_5'];
                $comments = $_POST['PARAM_6'];
-               $destination = $_POST['PARAM_7'];
+               $orientation = $_POST['PARAM_7'];
+               $destination = $_POST['PARAM_8'];
        }
        else if ($dim == 1)
        {
                $dimension = $_POST['PARAM_4'];
                $comments = $_POST['PARAM_5'];
-               $destination = $_POST['PARAM_6'];
+               $orientation = $_POST['PARAM_6'];
+               $destination = $_POST['PARAM_7'];
        }
        else
        {
                $comments = $_POST['PARAM_4'];
-               $destination = $_POST['PARAM_5'];
+               $orientation = $_POST['PARAM_5'];
+               $destination = $_POST['PARAM_6'];
        }
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
        $cols2 = array(0, 50, 190, 310, 430, 530);
@@ -203,7 +207,12 @@ function print_trial_balance()
                                    1 => array('text' => _('Period'),'from' => $from, 'to' => $to));
     }
 
-       $rep = new FrontReport(_('Trial Balance'), "TrialBalance", user_pagesize());
+       $rep = new FrontReport(_('Trial Balance'), "TrialBalance", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+    {
+       recalculate_cols($cols);
+       recalculate_cols($cols2);
+       }
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
index 21646d78d0e77b92cb6c7f9421238c9a5e6a2314..1e781f25079dadb42f29b9480191e5a6c3cac87f 100644 (file)
@@ -79,16 +79,18 @@ function print_tax_report()
        $to = $_POST['PARAM_1'];
        $summaryOnly = $_POST['PARAM_2'];
        $comments = $_POST['PARAM_3'];
-       $destination = $_POST['PARAM_4'];
+       $orientation = $_POST['PARAM_4'];
+       $destination = $_POST['PARAM_5'];
 
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
        $dec = user_price_dec();
 
-       $rep = new FrontReport(_('Tax Report'), "TaxReport", user_pagesize());
+       $rep = new FrontReport(_('Tax Report'), "TaxReport", user_pagesize(), 9, $orientation);
        if ($summaryOnly == 1)
                $summary = _('Summary Only');
        else
@@ -109,6 +111,9 @@ function print_tax_report()
        $headers = array(_('Trans Type'), _('Ref'), _('Date'), _('Name'), _('Branch Name'),
                _('Net'), _('Rate'), _('Tax'), '', _('Name'));
        $aligns = array('left', 'left', 'left', 'left', 'left', 'right', 'right', 'right', 'right','left');
+    if ($orientation == 'L')
+       recalculate_cols($cols);
+
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
        if (!$summaryOnly)
@@ -172,6 +177,8 @@ function print_tax_report()
        
        // Summary
        $cols2 = array(0, 100, 180,     260, 340, 420, 500);
+    if ($orientation == 'L')
+       recalculate_cols($cols2);
 
        $headers2 = array(_('Tax Rate'), _('Outputs'), _('Output Tax'), _('Inputs'), _('Input Tax'), _('Net Tax'));
 
index 06485b2c2b20b828c103703bf93ab236763cad15..d6fa3f74a7821f481a84e8d08902863e2edf5a75 100644 (file)
@@ -62,12 +62,14 @@ function print_audit_trail()
     $systype = $_POST['PARAM_2'];
     $user = $_POST['PARAM_3'];
     $comments = $_POST['PARAM_4'];
-       $destination = $_POST['PARAM_5'];
+       $orientation = $_POST['PARAM_5'];
+       $destination = $_POST['PARAM_6'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
                include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
+       $orientation = ($orientation ? 'L' : 'P');
     $dec = user_price_dec();
 
     $cols = array(0, 60, 120, 180, 240, 340, 400, 460, 520);
@@ -84,7 +86,9 @@ function print_audit_trail()
                        2 => array('text' => _('Type'), 'from' => ($systype != -1 ? $systypes_array[$systype] : _('All')), 'to' => ''),
                        3 => array('text' => _('User'), 'from' => ($user != -1 ? $user_id : _('All')), 'to' => ''));
 
-    $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize());
+    $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize(), 9, $orientation);
+    if ($orientation == 'L')
+       recalculate_cols($cols);
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
index 0c47c9ce6c290540c56e096c3146f0de2fd22446..1acc8af3150387123378f732a4732cb1133eb268 100644 (file)
@@ -37,6 +37,7 @@ $reports->addReport(RC_CUSTOMER, 101, _('Customer &Balances'),
                        _('Currency Filter') => 'CURRENCY',
                        _('Suppress Zeros') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 102, _('&Aged Customer Analysis'),
        array(  _('End Date') => 'DATE',
@@ -47,6 +48,7 @@ $reports->addReport(RC_CUSTOMER, 102, _('&Aged Customer Analysis'),
                        _('Suppress Zeros') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 103, _('Customer &Detail Listing'),
        array(  _('Activity Since') => 'DATEBEGIN',
@@ -55,12 +57,14 @@ $reports->addReport(RC_CUSTOMER, 103, _('Customer &Detail Listing'),
                        _('Activity Greater Than') => 'TEXT',
                        _('Activity Less Than') => 'TEXT',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 114, _('Sales &Summary Report'),
        array(  _('Start Date') => 'DATEBEGINTAX',
                        _('End Date') => 'DATEENDTAX',
                        _('Tax Id Only') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 104, _('&Price Listing'),
        array(  _('Currency Filter') => 'CURRENCY',
@@ -69,6 +73,7 @@ $reports->addReport(RC_CUSTOMER, 104, _('&Price Listing'),
                        _('Show Pictures') => 'YES_NO',
                        _('Show GP %') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 105, _('&Order Status Listing'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -77,12 +82,14 @@ $reports->addReport(RC_CUSTOMER, 105, _('&Order Status Listing'),
                        _('Stock Location') => 'LOCATIONS',
                        _('Back Orders Only') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 106, _('&Salesman Listing'),
        array(  _('Start Date') => 'DATEBEGINM',
                        _('End Date') => 'DATEENDM',
                        _('Summary Only') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_CUSTOMER, 107, _('Print &Invoices'),
        array(  _('From') => 'INVOICE',
@@ -90,44 +97,51 @@ $reports->addReport(RC_CUSTOMER, 107, _('Print &Invoices'),
                        _('Currency Filter') => 'CURRENCY',
                        _('email Customers') => 'YES_NO',
                        _('Payment Link') => 'PAYMENT_LINK',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_CUSTOMER, 113, _('Print &Credit Notes'),
        array(  _('From') => 'CREDIT',
                        _('To') => 'CREDIT',
                        _('Currency Filter') => 'CURRENCY',
                        _('email Customers') => 'YES_NO',
                        _('Payment Link') => 'PAYMENT_LINK',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_CUSTOMER, 110, _('Print &Deliveries'),
        array(  _('From') => 'DELIVERY',
                        _('To') => 'DELIVERY',
                        _('email Customers') => 'YES_NO',
                        _('Print as Packing Slip') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_CUSTOMER, 108, _('Print &Statements'),
        array(  _('Customer') => 'CUSTOMERS_NO_FILTER',
                        _('Currency Filter') => 'CURRENCY',
                        _('Show Also Allocated') => 'YES_NO',
                        _('Email Customers') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_CUSTOMER, 109, _('&Print Sales Orders'),
        array(  _('From') => 'ORDERS',
                        _('To') => 'ORDERS',
                        _('Currency Filter') => 'CURRENCY',
                        _('Email Customers') => 'YES_NO',
                        _('Print as Quote') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_CUSTOMER, 111, _('&Print Sales Quotations'),
        array(  _('From') => 'QUOTATIONS',
                        _('To') => 'QUOTATIONS',
                        _('Currency Filter') => 'CURRENCY',
                        _('Email Customers') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_CUSTOMER, 112, _('Print Receipts'),
        array(  _('From') => 'RECEIPT',
                        _('To') => 'RECEIPT',
                        _('Currency Filter') => 'CURRENCY',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 
 $reports->addReportClass(_('Supplier'), RC_SUPPLIER);
 $reports->addReport(RC_SUPPLIER, 201, _('Supplier &Balances'),
@@ -137,6 +151,7 @@ $reports->addReport(RC_SUPPLIER, 201, _('Supplier &Balances'),
                        _('Currency Filter') => 'CURRENCY',
                        _('Suppress Zeros') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_SUPPLIER, 202, _('&Aged Supplier Analyses'),
        array(  _('End Date') => 'DATE',
@@ -147,6 +162,7 @@ $reports->addReport(RC_SUPPLIER, 202, _('&Aged Supplier Analyses'),
                        _('Suppress Zeros') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_SUPPLIER, 203, _('&Payment Report'),
        array(  _('End Date') => 'DATE',
@@ -154,23 +170,27 @@ $reports->addReport(RC_SUPPLIER, 203, _('&Payment Report'),
                        _('Currency Filter') => 'CURRENCY',
                        _('Suppress Zeros') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_SUPPLIER, 204, _('Outstanding &GRNs Report'),
        array(  _('Supplier') => 'SUPPLIERS_NO_FILTER',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_SUPPLIER, 209, _('Print Purchase &Orders'),
        array(  _('From') => 'PO',
                        _('To') => 'PO',
                        _('Currency Filter') => 'CURRENCY',
                        _('Email Customers') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReport(RC_SUPPLIER, 210, _('Print Remittances'),
        array(  _('From') => 'REMITTANCE',
                        _('To') => 'REMITTANCE',
                        _('Currency Filter') => 'CURRENCY',
                        _('Email Customers') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 
 $reports->addReportClass(_('Inventory'), RC_INVENTORY);
 
@@ -180,11 +200,13 @@ $reports->addReport(RC_INVENTORY,  301, _('Inventory &Valuation Report'),
                        _('Location') => 'LOCATIONS',
                        _('Summary Only') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_INVENTORY,  302, _('Inventory &Planning Report'),
        array(  _('Inventory Category') => 'CATEGORIES',
                        _('Location') => 'LOCATIONS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_INVENTORY, 303, _('Stock &Check Sheets'),
        array(  _('Inventory Category') => 'CATEGORIES',
@@ -194,6 +216,7 @@ $reports->addReport(RC_INVENTORY, 303, _('Stock &Check Sheets'),
                        _('Show Shortage') => 'YES_NO',
                        _('Suppress Zeros') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_INVENTORY, 304, _('Inventory &Sales Report'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -202,11 +225,13 @@ $reports->addReport(RC_INVENTORY, 304, _('Inventory &Sales Report'),
                        _('Location') => 'LOCATIONS',
                        _('Customer') => 'CUSTOMERS_NO_FILTER',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_INVENTORY, 305, _('&GRN Valuation Report'),
        array(  _('Start Date') => 'DATEBEGINM',
                        _('End Date') => 'DATEENDM',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_INVENTORY, 306, _('Inventory P&urchasing Report'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -216,6 +241,7 @@ $reports->addReport(RC_INVENTORY, 306, _('Inventory P&urchasing Report'),
                        _('Supplier') => 'SUPPLIERS_NO_FILTER',
                        _('Items') => 'ITEMS_P',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 
 $reports->addReportClass(_('Manufacturing'), RC_MANUFACTURE);
@@ -223,12 +249,14 @@ $reports->addReport(RC_MANUFACTURE, 401, _('&Bill of Material Listing'),
        array(  _('From product') => 'ITEMS',
                        _('To product') => 'ITEMS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_MANUFACTURE, 409, _('Print &Work Orders'),
        array(  _('From') => 'WORKORDER',
                        _('To') => 'WORKORDER',
                        _('Email Locations') => 'YES_NO',
-                       _('Comments') => 'TEXTBOX'));
+                       _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION'));
 $reports->addReportClass(_('Dimensions'), RC_DIMENSIONS);
 if ($dim > 0)
 {
@@ -237,6 +265,7 @@ if ($dim > 0)
                        _('To Dimension') => 'DIMENSION',
                        _('Show Balance') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        //$reports->addReport(_('Dimensions'),502, _('Dimension Details'),
        //array(        _('Dimension'),'DIMENSIONS'),
@@ -249,18 +278,21 @@ $reports->addReportClass(_('Banking'), RC_BANKING);
                        _('End Date') => 'DATEENDM',
                        _('Zero values') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 
 $reports->addReportClass(_('General Ledger'), RC_GL);
 $reports->addReport(RC_GL, 701, _('Chart of &Accounts'),
        array(  _('Show Balances') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_GL, 702, _('List of &Journal Entries'),
        array(  _('Start Date') => 'DATEBEGINM',
                        _('End Date') => 'DATEENDM',
                        _('Type') => 'SYS_TYPES',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 //$reports->addReport(RC_GL, 703, _('GL Account Group Summary'),
 //     array(  _('Comments'),'TEXTBOX')));
@@ -275,6 +307,7 @@ if ($dim == 2)
                        _('Dimension')." 1" =>  'DIMENSIONS1',
                        _('Dimension')." 2" =>  'DIMENSIONS2',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 705, _('Annual &Expense Breakdown'),
        array(  _('Year') => 'TRANS_YEARS',
@@ -282,6 +315,7 @@ if ($dim == 2)
                        _('Dimension')." 2" =>  'DIMENSIONS2',
                        _('Account Tags') =>  'ACCOUNTTAGS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 706, _('&Balance Sheet'),
        array(  _('Start Date') => 'DATEBEGIN',
@@ -292,6 +326,7 @@ if ($dim == 2)
                        _('Decimal values') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 707, _('&Profit and Loss Statement'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -303,6 +338,7 @@ if ($dim == 2)
                        _('Decimal values') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 708, _('Trial &Balance'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -312,6 +348,7 @@ if ($dim == 2)
                        _('Dimension')." 1" =>  'DIMENSIONS1',
                        _('Dimension')." 2" =>  'DIMENSIONS2',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 }
 else if ($dim == 1)
@@ -323,12 +360,14 @@ else if ($dim == 1)
                        _('To Account') => 'GL_ACCOUNTS',
                        _('Dimension') =>  'DIMENSIONS1',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 705, _('Annual &Expense Breakdown'),
        array(  _('Year') => 'TRANS_YEARS',
                        _('Dimension') =>  'DIMENSIONS1',
                        _('Account Tags') =>  'ACCOUNTTAGS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 706, _('&Balance Sheet'),
        array(  _('Start Date') => 'DATEBEGIN',
@@ -338,6 +377,7 @@ else if ($dim == 1)
                        _('Decimal values') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 707, _('&Profit and Loss Statement'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -348,6 +388,7 @@ else if ($dim == 1)
                        _('Decimal values') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 708, _('Trial &Balance'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -356,6 +397,7 @@ else if ($dim == 1)
                        _('Only balances') => 'YES_NO',
                        _('Dimension') => 'DIMENSIONS1',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 }
 else
@@ -366,11 +408,13 @@ else
                        _('From Account') => 'GL_ACCOUNTS',
                        _('To Account') => 'GL_ACCOUNTS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 705, _('Annual &Expense Breakdown'),
        array(  _('Year') => 'TRANS_YEARS',
                        _('Account Tags') =>  'ACCOUNTTAGS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 706, _('&Balance Sheet'),
        array(  _('Start Date') => 'DATEBEGIN',
@@ -379,6 +423,7 @@ else
                        _('Decimal values') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 707, _('&Profit and Loss Statement'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -388,6 +433,7 @@ else
                        _('Decimal values') => 'YES_NO',
                        _('Graphics') => 'GRAPHIC',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
        $reports->addReport(RC_GL, 708, _('Trial &Balance'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -395,6 +441,7 @@ else
                        _('Zero values') => 'YES_NO',
                        _('Only balances') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 }
 $reports->addReport(RC_GL, 709, _('Ta&x Report'),
@@ -402,6 +449,7 @@ $reports->addReport(RC_GL, 709, _('Ta&x Report'),
                        _('End Date') => 'DATEENDTAX',
                        _('Summary Only') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 $reports->addReport(RC_GL, 710, _('Audit Trail'),
        array(  _('Start Date') => 'DATEBEGINM',
@@ -409,6 +457,7 @@ $reports->addReport(RC_GL, 710, _('Audit Trail'),
                        _('Type') => 'SYS_TYPES_ALL',
                        _('User') => 'USERS',
                        _('Comments') => 'TEXTBOX',
+                       _('Orientation') => 'ORIENTATION',
                        _('Destination') => 'DESTINATION'));
 
 add_custom_reports($reports);
index 5a55293254809cde3a5bac4c7562c7e018112659..ba14c8096239789dbdb107bf28fdc46d24885149 100644 (file)
@@ -7,7 +7,7 @@
        <meta name="CHANGED" content="20100902;19041400"></head>\r
 <body dir="ltr" lang="en-US">\r
 <h4><strong><font color="#cc6600"><font style="font-size: 20pt;" size="5"><i>Front</i></font></font></strong><strong><font style="font-size: 20pt;" size="5">Accounting\r
-Update</font></strong></h4><h2>Important Notes for release 2.3.13.</h2><h4>New global flags in config.php (config-default.php):</h4>/* No check on edit conflicts. Maybe needed to be set to 1 in certains Windows Servers */<br>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">$no_check_edit_conflicts = 0;</span><br><h2>Important Notes for release 2.3.12.</h2><h4>New global flags in config.php (config-default.php):</h4>/* <br>&nbsp;&nbsp;&nbsp; Display a dropdown select box for choosing Company to login if false.<br>&nbsp;&nbsp;&nbsp; Show a blank editbox only if true where the Company NickName<br>&nbsp;&nbsp;&nbsp; will have to be manually entered. This is when privacy is needed.<br>*/<br>&nbsp; &nbsp; <span style="font-weight: bold;">$text_company_selection</span>&nbsp; = false;<br><br>/*&nbsp; Should FA hide menu items (Applications, Modules, and Actions) from the user if they don't have access to them? <br>&nbsp;&nbsp;&nbsp; 0 for no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 for yes<br>*/<br><br>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">$hide_inaccessible_menu_items</span> = 0;<br><br>/*<br>&nbsp;&nbsp;&nbsp; Brute force prevention.<br>&nbsp;&nbsp;&nbsp; $login_delay seconds delay is required between login attempts after $login_max_attemps failed logins.<br>&nbsp;&nbsp;&nbsp; Set $login_delay to 0 to disable the feature (not recommended)<br>*/<br>&nbsp; &nbsp; <span style="font-weight: bold;">$login_delay</span> = 30;<br>&nbsp; &nbsp; <span style="font-weight: bold;">$login_max_attempts</span> = 10;<h2><strong></strong>Important Notes for release 2.3.5.</h2>\r
+Update</font></strong></h4><h2>Important Notes for release 2.3.14.</h2><h4>New global flags in config.php (config-default.php):</h4>/* default print orientation. 0 = Portrait, 1 = Landscape */<br>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">$def_print_orientation = 0;</span><br><h2>Important Notes for release 2.3.13.</h2><h4>New global flags in config.php (config-default.php):</h4>/* No check on edit conflicts. Maybe needed to be set to 1 in certains Windows Servers */<br>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">$no_check_edit_conflicts = 0;</span><br><h2>Important Notes for release 2.3.12.</h2><h4>New global flags in config.php (config-default.php):</h4>/* <br>&nbsp;&nbsp;&nbsp; Display a dropdown select box for choosing Company to login if false.<br>&nbsp;&nbsp;&nbsp; Show a blank editbox only if true where the Company NickName<br>&nbsp;&nbsp;&nbsp; will have to be manually entered. This is when privacy is needed.<br>*/<br>&nbsp; &nbsp; <span style="font-weight: bold;">$text_company_selection</span>&nbsp; = false;<br><br>/*&nbsp; Should FA hide menu items (Applications, Modules, and Actions) from the user if they don't have access to them? <br>&nbsp;&nbsp;&nbsp; 0 for no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 for yes<br>*/<br><br>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">$hide_inaccessible_menu_items</span> = 0;<br><br>/*<br>&nbsp;&nbsp;&nbsp; Brute force prevention.<br>&nbsp;&nbsp;&nbsp; $login_delay seconds delay is required between login attempts after $login_max_attemps failed logins.<br>&nbsp;&nbsp;&nbsp; Set $login_delay to 0 to disable the feature (not recommended)<br>*/<br>&nbsp; &nbsp; <span style="font-weight: bold;">$login_delay</span> = 30;<br>&nbsp; &nbsp; <span style="font-weight: bold;">$login_max_attempts</span> = 10;<h2><strong></strong>Important Notes for release 2.3.5.</h2>\r
 Change in the behaviour of <span style="font-weight: bold; font-style: italic;">Recurrent Invoices</span>.<br><ul><li>Now\r
 the Last Sent day is stamped with the former Last Sent (or Begin date\r
 the first time) + months + days. Before the Last Sent day was stamped\r