X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=2cc16888e5fdbd15a94e587fccbadc0ca1691843;hb=e3004d8581b1ea3c02bfe2b1e880990309c4459e;hp=596144e174809e4bc8b7b55ffb7dd160c18e779e;hpb=14175bfc95a7ffb1303494f7915931c9096a6898;p=fa-stable.git diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index 596144e1..2cc16888 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -214,11 +214,15 @@ $opts = array( // default options } $cat = $contact_row[$opts['category']]; if ($opts['category'] !== false && $cat != $lastcat){ + if ($lastcat!==null) + $selector .= ""; $selector .= "\n"; $lastcat = $cat; } $selector .= "\n"; } + if ($lastcat!==null) + $selector .= ""; db_free_result($result); } @@ -368,7 +372,6 @@ $opts = array( // default options if ($first_id!==false) { $sel = ($found===$first_id) || ($found===false && ($spec_option===false)) ? "selected='selected'" : ''; - $selector = sprintf($first_opt, $sel).$selector; } // Prepend special option. if ($spec_option !== false) { // if special option used - add it @@ -450,6 +453,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 +506,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, @@ -673,7 +678,7 @@ return combo_input($name, $selected_id, $sql, 'id', '', function _format_fiscalyears($row) { return sql2date($row[1]) . " - " . sql2date($row[2]) - . "  " . ($row[3] ? _('Closed') : _('Active')) . "\n"; + . "  " . ($row[3] ? _('Closed') : _('Active')); } function fiscalyears_list_cells($label, $name, $selected_id=null) @@ -833,8 +838,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 "$label\n"; echo sales_items_list($name, $selected_id, $all_option, $submit_on_change, @@ -1409,7 +1417,7 @@ function workcenter_list_row($label, $name, $selected_id=null, $all_option=false //----------------------------------------------------------------------------------------------- -function bank_accounts_list($name, $selected_id=null, $submit_on_change=false, $spec_option=false, $submit_on_change=false) +function bank_accounts_list($name, $selected_id=null, $submit_on_change=false, $spec_option=false) { $sql = "SELECT ".TB_PREF."bank_accounts.id, bank_account_name, bank_curr_code, inactive FROM ".TB_PREF."bank_accounts"; @@ -1912,8 +1920,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,