Implemented Selectable Print Orientation (Portrait, Landscape) for all reports in...
[fa-stable.git] / reporting / includes / reports_classes.inc
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);