}
$cat = $contact_row[$opts['category']];
if ($opts['category'] !== false && $cat != $lastcat){
+ if ($lastcat!==null)
+ $selector .= "</optgroup>";
$selector .= "<optgroup label='".$cat."'>\n";
$lastcat = $cat;
}
$selector .= "<option $sel $optclass value='$value'>$descr</option>\n";
}
+ if ($lastcat!==null)
+ $selector .= "</optgroup>";
db_free_result($result);
}
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
'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,
'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,
function _format_fiscalyears($row)
{
return sql2date($row[1]) . " - " . sql2date($row[2])
- . " " . ($row[3] ? _('Closed') : _('Active')) . "</option>\n";
+ . " " . ($row[3] ? _('Closed') : _('Active'));
}
function fiscalyears_list_cells($label, $name, $selected_id=null)
), $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,
$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,
{
global $payment_services;
- $services = array_combine(array_keys($payment_services), array_keys($payment_services));
+ $services = (object)array_combine(array_keys($payment_services), array_keys($payment_services));
return array_selector($name, null, $services, array(
'spec_option'=> _("No payment Link"),