Changed popup to tabs in customers, suppliers, items for transactions.
[fa-stable.git] / sales / inquiry / customer_inquiry.php
index 0b3d2bfdfd12a00d8821d06b05d34e05e352e707..877b33e0709590b26f161ab6b0b9524f432db26a 100644 (file)
@@ -18,13 +18,15 @@ include_once($path_to_root . "/sales/includes/sales_ui.inc");
 include_once($path_to_root . "/sales/includes/sales_db.inc");\r
 include_once($path_to_root . "/reporting/includes/reporting.inc");\r
 \r
-$js = "";\r
-if ($use_popup_windows)\r
-       $js .= get_js_open_window(900, 500);\r
-if ($use_date_picker)\r
-       $js .= get_js_date_picker();\r
-page(_($help_context = "Customer Transactions"), isset($_GET['customer_id']), false, "", $js);\r
-\r
+if (!@$_GET['popup'])\r
+{\r
+       $js = "";\r
+       if ($use_popup_windows)\r
+               $js .= get_js_open_window(900, 500);\r
+       if ($use_date_picker)\r
+               $js .= get_js_date_picker();\r
+       page(_($help_context = "Customer Transactions"), isset($_GET['customer_id']), false, "", $js);\r
+}\r
 \r
 if (isset($_GET['customer_id']))\r
 {\r
@@ -33,7 +35,8 @@ if (isset($_GET['customer_id']))
 \r
 //------------------------------------------------------------------------------------------------\r
 \r
-start_form();\r
+if (!@$_GET['popup'])\r
+       start_form();\r
 \r
 if (!isset($_POST['customer_id']))\r
        $_POST['customer_id'] = get_global_customer();\r
@@ -41,7 +44,8 @@ if (!isset($_POST['customer_id']))
 start_table(TABLESTYLE_NOBORDER);\r
 start_row();\r
 \r
-customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, !@$_REQUEST['popup']);\r
+if (!@$_GET['popup'])\r
+       customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, !@$_GET['popup']);\r
 \r
 date_cells(_("From:"), 'TransAfterDate', '', null, -30);\r
 date_cells(_("To:"), 'TransToDate', '', null, 1);\r
@@ -154,7 +158,7 @@ function fmt_credit($row)
 \r
 function credit_link($row)\r
 {\r
-       if (@$_REQUEST['popup'])\r
+       if (@$_GET['popup'])\r
                return '';\r
        return $row['type'] == ST_SALESINVOICE && $row["Outstanding"] > 0 ?\r
                pager_link(_("Credit This") ,\r
@@ -165,7 +169,7 @@ function edit_link($row)
 {\r
        $str = '';\r
 \r
-       if (@$_REQUEST['popup'])\r
+       if (@$_GET['popup'])\r
                return '';\r
        switch($row['type']) {\r
        case ST_SALESINVOICE:\r
@@ -250,9 +254,9 @@ $table->width = "85%";
 \r
 display_db_pager($table);\r
 \r
-hidden('popup', @$_REQUEST['popup']);\r
-end_form();\r
-\r
-end_page(@$_REQUEST['popup'], false, false);\r
-\r
+if (!@$_GET['popup'])\r
+{\r
+       end_form();\r
+       end_page(@$_GET['popup'], false, false);\r
+}\r
 ?>\r