Removed many global variables from config.default.php to GL Setup, Company Setup...
[fa-stable.git] / sales / inquiry / sales_deliveries_view.php
index 4da4d98b5ca06798cf0e60cd5a7029942171141d..91787385f11d953dbb273880ba6cae309d7741c3 100644 (file)
@@ -20,7 +20,7 @@ include_once($path_to_root . "/reporting/includes/reporting.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 600);
-if ($use_date_picker)
+if (user_use_date_picker())
        $js .= get_js_date_picker();
 
 if (isset($_GET['OutstandingOnly']) && ($_GET['OutstandingOnly'] == true))
@@ -113,6 +113,8 @@ start_row();
 
 stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true);
 
+customer_list_cells(_("Select a customer: "), 'customer_id', null, true, true);
+
 submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default');
 
 hidden('OutstandingOnly', $_POST['OutstandingOnly']);
@@ -173,7 +175,7 @@ function check_overdue($row)
                        $row["Outstanding"]!=0;
 }
 //------------------------------------------------------------------------------------------------
-$sql = get_sql_for_sales_deliveries_view($selected_customer, $selected_stock_item);
+$sql = get_sql_for_sales_deliveries_view($selected_customer, $selected_stock_item, $_POST['customer_id']);
 
 $cols = array(
                _("Delivery #") => array('fun'=>'trans_view'),