Added short name, name and tax id as search options in customer and supplier lists
[fa-stable.git] / includes / ui / ui_lists.inc
index 68a593292b8c75ab52d0188aee17e44a66c0aa2a..27f812da38675e43b1bb7a0f267d787dc47c33cf 100644 (file)
@@ -450,6 +450,7 @@ function supplier_list($name, $selected_id=null, $spec_option=false, $submit_on_
            'order' => array('supp_ref'),
                'search_box' => $mode!=0,
                'type' => 1,
+        'search' => array("supp_ref","supp_name","gst_no"),        
                'spec_option' => $spec_option === true ? _("All Suppliers") : $spec_option,
                'spec_id' => $all_items,
                'select_submit'=> $submit_on_change,
@@ -502,6 +503,7 @@ function customer_list($name, $selected_id=null, $spec_option=false, $submit_on_
                'search_box' => $mode!=0,
                'type' => 1,
                'size' => 20,
+        'search' => array("debtor_ref","name","tax_id"),        
                'spec_option' => $spec_option === true ? _("All Customers") : $spec_option,
                'spec_id' => $all_items,
                'select_submit'=> $submit_on_change,
@@ -833,8 +835,11 @@ function sales_items_list($name, $selected_id=null, $all_option=false,
          ), $opts) );
 }
 
-function sales_items_list_cells($label, $name, $selected_id=null, $all_option=false, $submit_on_change=false)
+function sales_items_list_cells($label, $name, $selected_id=null, $all_option=false, $submit_on_change=false, $editkey=false)
 {
+       if ($editkey)
+               set_editor('item', $name, $editkey);
+
        if ($label != null)
                echo "<td>$label</td>\n";
        echo sales_items_list($name, $selected_id, $all_option, $submit_on_change,
@@ -1912,8 +1917,7 @@ function journal_types_list_cells($label, $name, $value=null, $submit_on_change=
        $items = $systypes_array;
 
        // exclude quotes, orders and dimensions
-       foreach (array(ST_PURCHORDER, ST_WORKORDER, ST_SALESORDER, ST_DIMENSION, 
-                               ST_SALESQUOTE, ST_LOCTRANSFER) as $excl)
+       foreach (array(ST_PURCHORDER, ST_SALESORDER, ST_DIMENSION, ST_SALESQUOTE, ST_LOCTRANSFER) as $excl)
                        unset($items[$excl]);
        
        echo array_selector($name, $value, $items,