Fixed session name to avoid conflicts during multiuser debugging.
[fa-stable.git] / admin / view_print_transaction.php
index 70c5ca51620b9cd048d7fde52173c6c9b7368938..48a0e176c2aa5b0e2b11599ad47a19b8595477a4 100644 (file)
@@ -36,7 +36,7 @@ function viewing_controls()
 
     ref_cells(_("to #:"), 'ToTransNo');
 
-    submit_cells('ProcessSearch', _("Search"));
+    submit_cells('ProcessSearch', _("Search"), '', '', true);
 
        end_row();
     end_table(1);
@@ -59,7 +59,7 @@ function check_valid_entries()
                echo _("The ending transaction number is expected to be numeric and greater than zero.");
                return false;
        }
-       if ($_POST['filterType'] == "")
+       if (!isset($_POST['filterType']) || $_POST['filterType'] == "")
                return false;
 
        return true;
@@ -108,7 +108,6 @@ function handle_search()
                        $print_type == systypes::po() || $print_type == systypes::sales_order());
                if ($print_out)
                {
-                       print_hidden_script($print_type);
                        if ($trans_ref)
                                $th = array(_("#"), _("Reference"), _("View"), _("Print"), _("GL"));
                        else
@@ -121,6 +120,7 @@ function handle_search()
                        else
                                $th = array(_("#"), _("View"), _("GL"));
                }
+               div_start('transactions');
                start_table($table_style);
                table_header($th);
                $k = 0;
@@ -142,6 +142,7 @@ function handle_search()
                }
 
                end_table();
+               div_end();
        }
 }
 
@@ -151,6 +152,7 @@ if (isset($_POST['ProcessSearch']))
 {
        if (!check_valid_entries())
                unset($_POST['ProcessSearch']);
+       $Ajax->activate('transactions');
 }
 
 //----------------------------------------------------------------------------------------