Cleanup in db_pager get_sql and testing it.
[fa-stable.git] / purchasing / inquiry / po_search_completed.php
index 3d3acbe2a95e20d76d473584e6b0e1062db99dfd..cb67ab7d4ba5a4d71ba71964a542df0704f778a5 100644 (file)
@@ -26,7 +26,7 @@ page(_($help_context = "Search Purchase Orders"), false, false, "", $js);
 
 if (isset($_GET['order_number']))
 {
-       $order_number = $_GET['order_number'];
+       $_POST['order_number'] = $_GET['order_number'];
 }
 
 //-----------------------------------------------------------------------------------
@@ -119,8 +119,7 @@ function prt_link($row)
 //---------------------------------------------------------------------------------------------
 
 $sql = get_sql_for_po_search_completed(get_post('OrdersAfterDate'), get_post('OrdersToDate'),
-       get_post('supplier_id') !== '' ? get_post('supplier_id') : ALL_TEXT,
-       get_post('StockLocation'), get_post('order_number'), get_post('SelectStockFromList'));
+       get_post('supplier_id'), get_post('StockLocation'), get_post('order_number'), get_post('SelectStockFromList'));
 
 $cols = array(
                _("#") => array('fun'=>'trans_view', 'ord'=>''),