Fixed Next bug for pagers in customers and suppliers transactions.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 2 Nov 2011 11:04:38 +0000 (12:04 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 2 Nov 2011 11:04:38 +0000 (12:04 +0100)
purchasing/includes/db/po_db.inc
purchasing/manage/suppliers.php
sales/inquiry/customer_inquiry.php
sales/manage/customers.php

index adab9ad31f67b534283a7bb6f18303fe8c1262d0..e841d5e8caa34208d56c97069d823a5e096939f1 100644 (file)
@@ -269,6 +269,8 @@ function get_sql_for_po_search_completed()
                AND porder.supplier_id = supplier.supplier_id
                AND location.loc_code = porder.into_stock_location ";
 
+       if (isset($_GET['supplier_id']))
+               $sql .= "AND supplier.supplier_id=".@$_GET['supplier_id']." ";
        if (isset($order_number) && $order_number != "")
        {
                $sql .= "AND porder.reference LIKE ".db_escape('%'. $order_number . '%');
index 91f16d6401b465b7c15dcbfdf346aa6104eb630a..3f2d85665563535547e10c824fe2eacae7e980fa 100644 (file)
@@ -11,7 +11,8 @@
 ***********************************************************************/
 $page_security = 'SA_SUPPLIER';
 $path_to_root = "../..";
-include($path_to_root . "/includes/session.inc");
+include($path_to_root . "/includes/db_pager.inc");
+include_once($path_to_root . "/includes/session.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
@@ -318,13 +319,11 @@ tabbed_content_start('tabs', array(
                case 'transactions':
                        $_GET['supplier_id'] = $supplier_id;
                        $_GET['popup'] = 1;
-                       $_SERVER['REQUEST_METHOD'] = 'GET';                     
                        include_once($path_to_root."/purchasing/inquiry/supplier_inquiry.php");
                        break;
                case 'orders':
                        $_GET['supplier_id'] = $supplier_id;
                        $_GET['popup'] = 1;
-                       $_SERVER['REQUEST_METHOD'] = 'GET';                     
                        include_once($path_to_root."/purchasing/inquiry/po_search_completed.php");
                        break;
        };
index 877b33e0709590b26f161ab6b0b9524f432db26a..67b44745872c33113cd71e9d0b3c62efaaa76f43 100644 (file)
@@ -11,7 +11,7 @@
 ***********************************************************************/\r
 $page_security = 'SA_SALESTRANSVIEW';\r
 $path_to_root = "../..";\r
-include($path_to_root . "/includes/db_pager.inc");\r
+include_once($path_to_root . "/includes/db_pager.inc");\r
 include_once($path_to_root . "/includes/session.inc");\r
 \r
 include_once($path_to_root . "/sales/includes/sales_ui.inc");\r
index 0a11de23aed9a547cd2f6d337fc136c58e1954cb..7df12402b17207d54156ec2cd320d0c3802a6068 100644 (file)
@@ -12,6 +12,7 @@
 $page_security = 'SA_CUSTOMER';
 $path_to_root = "../..";
 
+include($path_to_root . "/includes/db_pager.inc");
 include_once($path_to_root . "/includes/session.inc");
 $js = "";
 if ($use_popup_windows)
@@ -353,13 +354,11 @@ tabbed_content_start('tabs', array(
                case 'transactions':
                        $_GET['customer_id'] = $selected_id;
                        $_GET['popup'] = 1;
-                       $_SERVER['REQUEST_METHOD'] = 'GET';                     
                        include_once($path_to_root."/sales/inquiry/customer_inquiry.php");
                        break;
                case 'orders':
                        $_GET['customer_id'] = $selected_id;
                        $_GET['popup'] = 1;
-                       $_SERVER['REQUEST_METHOD'] = 'GET';                     
                        include_once($path_to_root."/sales/inquiry/sales_orders_view.php");
                        break;
        };