Rerun
[fa-stable.git] / reporting / includes / reports_classes.inc
index 9cb78d8764f036c2873539bc6cd60ba52f179d58..aee1c00e4b7e2b244124ff335aa6ef245023a5a8 100644 (file)
@@ -32,7 +32,7 @@ class BoxReports
 
        function getDisplay($class=null)
        {
-               global $table_style2, $comp_path, $path_to_root, $pdf_debug, $Ajax;
+               global $table_style, $comp_path, $path_to_root, $pdf_debug, $Ajax;
 
 
                $temp = array_values($this->ar_classes);
@@ -50,7 +50,7 @@ class BoxReports
                                .$_SERVER['PHP_SELF']."?Class=$class_counter'"
                                ." class='menu_option' id='".default_focus()."'"
                                ." onclick='return showClass($class_counter);'$acc[1]>$acc[0]</a> <br>";
-                       $st_reports .= "<table id='TAB_" . $class_counter ."' $style cellpadding=0 cellspacing=0 border=0 width='100%'><tr><td><b>" . _("Reports For Class: ") . "&nbsp;$key</b></td></tr>\n";
+                       $st_reports .= "<table id='TAB_" . $class_counter ."' $style cellpadding=0 cellspacing=0 width='100%'><tr><td><b>" . _("Reports For Class: ") . "&nbsp;$key</b></td></tr>\n";
                        foreach($value as $report)
                        {
                                $acc = access_string($report->name);
@@ -62,11 +62,11 @@ class BoxReports
 
                                        $action = $path_to_root.'/reporting/prn_redirect.php';
        
-                                       $st_params = "<table border=0><tr><td>\n"
+                                       $st_params = "<table><tr><td>\n"
                                                . "<form method='POST' action='$action' target='_blank'>\n";
                                        $st_params .= submit('Rep'.$report->id,  
                                                _("Display: ") . access_string($report->name, true),
-                                               false, '', $pdf_debug ? false : 'default') . hidden('REP_ID', $report->id, false).'<br><br>';
+                                               false, '', $pdf_debug ? false : 'default process') . hidden('REP_ID', $report->id, false).'<br><br>';
                                        $st_params .= $this->getOptions($report->get_controls());
                                        $st_params .= "\n</form></td></tr></table>\n";
                                        set_focus('Rep'.$report->id);
@@ -99,9 +99,9 @@ class BoxReports
                                        }
                                </script>
                                ";
-               $st .= "<table align='center' width='80%' $table_style2><tr valign='top'>";
+               $st .= "<table align='center' width='80%' style='border:1px solid #cccccc;'><tr valign='top'>";
                $st .= "<td width='30%'>$st_classes</td>";
-               $st .= "<td width='35%'>$st_reports</td>";
+               $st .= "<td width='35%' style='border-left:1px solid #cccccc;border-right:1px solid #cccccc;padding-left:3px;'>$st_reports</td>";
                $st .= "<td width='35%'>$st_params</td>";
                $st .= "</tr></table><br>";
 
@@ -148,7 +148,7 @@ class BoxReports
        //
        function get_ctrl($name, $type)
        {
-               global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no;
+               global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no, $def_print_destination;
 
                $st = '';
                        switch ($type)
@@ -205,7 +205,10 @@ class BoxReports
 
                                case 'DESTINATION':
                                        $sel = array(_("PDF/Printer"), "Excel");
-                                       return array_selector($name, null, $sel);
+                                       $def = 0;
+                                       if (isset($def_print_destination) && $def_print_destination == 1)
+                                               $def = 1;
+                                       return array_selector($name, $def, $sel);
 
                                case 'COMPARE':
                                        $sel = array(_("Accumulated"), _("Period Y-1"), _("Budget"));