Cleanup in db_pager get_sql and testing it.
[fa-stable.git] / manufacturing / search_work_orders.php
index 05892e3ec90cb9cdb78db41f2cf37280422b4c1c..106114af07be77210318f3b52823e57f34237487 100644 (file)
@@ -153,14 +153,15 @@ function dec_amount($row, $amount)
        return number_format2($amount, $row['decimals']);
 }
 
-$sql = get_sql_for_work_orders($outstanding_only, $all_items);
+$sql = get_sql_for_work_orders($outstanding_only, get_post('SelectedStockItem'), get_post('StockLocation'), get_post('OrderNumber'), 
+       check_value('OverdueOnly'));
 
 $cols = array(
-       _("#") => array('fun'=>'view_link'), 
+       _("#") => array('fun'=>'view_link', 'ord'=>''), 
        _("Reference"), // viewlink 2 ?
        _("Type") => array('fun'=>'wo_type_name'),
        _("Location"), 
-       _("Item") => array('fun'=>'view_stock'),
+       _("Item") => array('fun'=>'view_stock', 'ord'=>''),
        _("Required") => array('fun'=>'dec_amount', 'align'=>'right'),
        _("Manufactured") => array('fun'=>'dec_amount', 'align'=>'right'),
        _("Date") => array('name'=>'date_', 'type'=>'date', 'ord'=>'desc'), 
@@ -181,4 +182,3 @@ display_db_pager($table);
 
 end_form();
 end_page();
-?>