Small fix for 5.3 compatibility.
[fa-stable.git] / sales / inquiry / sales_orders_view.php
index fbc6a35f88c44498f9c767045eabbd45accdf05f..f59be9c028bb5de375939bc49421bd8c3b1dbdb1 100644 (file)
@@ -24,15 +24,7 @@ set_page_security( @$_POST['order_view_mode'],
        array(  'OutstandingOnly' => 'SA_SALESDELIVERY',
                        'InvoiceTemplates' => 'SA_SALESINVOICE')
 );
-if (!@$_GET['popup'])\r
-{\r
-       $js = "";
-       if ($use_popup_windows)
-               $js .= get_js_open_window(900, 600);
-       if ($use_date_picker)
-               $js .= get_js_date_picker();
-       page($_SESSION['page_title'], false, false, "", $js);\r
-}
+
 if (get_post('type'))
        $trans_type = $_POST['type'];
 elseif (isset($_GET['type']) && $_GET['type'] == ST_SALESQUOTE)
@@ -69,6 +61,16 @@ else
        $_SESSION['page_title'] = _($help_context = "Search All Sales Quotations");
 }
 
+if (!@$_GET['popup'])
+{
+       $js = "";
+       if ($use_popup_windows)
+               $js .= get_js_open_window(900, 600);
+       if ($use_date_picker)
+               $js .= get_js_date_picker();
+       page($_SESSION['page_title'], false, false, "", $js);
+}
+
 if (isset($_GET['selected_customer']))
 {
        $selected_customer = $_GET['selected_customer'];
@@ -165,6 +167,8 @@ function tmpl_checkbox($row)
        global $trans_type;
        if ($trans_type == ST_SALESQUOTE)
                return '';
+       if (@$_GET['popup'])\r
+               return '';\r
        $name = "chgtpl" .$row['order_no'];
        $value = $row['type'] ? 1:0;