|
@@ -408,7 +408,7 @@ foreach ($search_array_options as $key => $val)
|
|
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
|
|
$typ=$extrafields->attribute_type[$tmpkey];
|
|
|
$mode=0;
|
|
|
- if (in_array($typ, array('int'))) $mode=1; // Search on a numeric
|
|
|
+ if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
|
|
|
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
|
|
|
{
|
|
|
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
|
|
@@ -604,35 +604,35 @@ if ($resql)
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only;
|
|
|
- print '<input class="flat" type="text" name="search_nom" size="8" value="'.dol_escape_htmltag($search_nom).'">';
|
|
|
+ print '<input class="flat searchstring" type="text" name="search_nom" size="8" value="'.dol_escape_htmltag($search_nom).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Barcode
|
|
|
if (! empty($arrayfields['s.barcode']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" type="text" name="sbarcode" size="6" value="'.dol_escape_htmltag($search_barcode).'">';
|
|
|
+ print '<input class="flat searchstring" type="text" name="sbarcode" size="6" value="'.dol_escape_htmltag($search_barcode).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Customer code
|
|
|
if (! empty($arrayfields['s.code_client']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="8" type="text" name="search_customer_code" value="'.dol_escape_htmltag($search_customer_code).'">';
|
|
|
+ print '<input class="flat searchstring" size="8" type="text" name="search_customer_code" value="'.dol_escape_htmltag($search_customer_code).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Supplier code
|
|
|
if (! empty($arrayfields['s.code_fournisseur']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="8" type="text" name="search_supplier_code" value="'.dol_escape_htmltag($search_supplier_code).'">';
|
|
|
+ print '<input class="flat searchstring" size="8" type="text" name="search_supplier_code" value="'.dol_escape_htmltag($search_supplier_code).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Account Customer code
|
|
|
if (! empty($arrayfields['s.code_compta']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="8" type="text" name="search_account_customer_code" value="'.dol_escape_htmltag($search_account_customer_code).'">';
|
|
|
+ print '<input class="flat searchstring" size="8" type="text" name="search_account_customer_code" value="'.dol_escape_htmltag($search_account_customer_code).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Account Supplier code
|
|
@@ -646,21 +646,21 @@ if ($resql)
|
|
|
if (! empty($arrayfields['s.town']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="6" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">';
|
|
|
+ print '<input class="flat searchstring" size="6" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Zip
|
|
|
if (! empty($arrayfields['s.zip']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// State
|
|
|
if (! empty($arrayfields['state.nom']['checked']))
|
|
|
{
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Country
|
|
@@ -681,42 +681,42 @@ if ($resql)
|
|
|
{
|
|
|
// IdProf1
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (! empty($arrayfields['s.siret']['checked']))
|
|
|
{
|
|
|
// IdProf2
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (! empty($arrayfields['s.ape']['checked']))
|
|
|
{
|
|
|
// IdProf3
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (! empty($arrayfields['s.idprof4']['checked']))
|
|
|
{
|
|
|
// IdProf4
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (! empty($arrayfields['s.idprof5']['checked']))
|
|
|
{
|
|
|
// IdProf5
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_idprof5" value="'.dol_escape_htmltag($search_idprof5).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_idprof5" value="'.dol_escape_htmltag($search_idprof5).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (! empty($arrayfields['s.idprof6']['checked']))
|
|
|
{
|
|
|
// IdProf6
|
|
|
print '<td class="liste_titre">';
|
|
|
- print '<input class="flat" size="4" type="text" name="search_idprof6" value="'.dol_escape_htmltag($search_idprof6).'">';
|
|
|
+ print '<input class="flat searchstring" size="4" type="text" name="search_idprof6" value="'.dol_escape_htmltag($search_idprof6).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
|
|
@@ -782,11 +782,14 @@ if ($resql)
|
|
|
$align=$extrafields->getAlignFlag($key);
|
|
|
$typeofextrafield=$extrafields->attribute_type[$key];
|
|
|
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
|
|
- if (in_array($typeofextrafield, array('varchar', 'int', 'select')))
|
|
|
+ if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
|
|
|
{
|
|
|
$crit=$val;
|
|
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
|
|
- print '<input class="flat" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
|
|
|
+ $searchclass='';
|
|
|
+ if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
|
|
|
+ if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
|
|
|
+ print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
|
|
|
}
|
|
|
print '</td>';
|
|
|
}
|