diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 80182c61adb..5351a3f5e7b 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -326,7 +326,8 @@ if ($id > 0 || ! empty($ref))
{
$navig.= ''.img_next().'';
}
- $navig.='';
+ $navig.='';
+
//var_dump($navig);
print '
';
diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php
index 80b76772f09..540cbebea12 100644
--- a/htdocs/fourn/facture/index.php
+++ b/htdocs/fourn/facture/index.php
@@ -73,7 +73,7 @@ if ($mode == 'search')
if ($modesearch == 'soc')
{
$sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s ";
- $sql.= " WHERE s.nom LIKE '%".$db->escape(strtolower($socname))."%'";
+ $sql.= " WHERE s.nom LIKE '%".$db->escape($socname)."%'";
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
}
@@ -127,7 +127,8 @@ if (GETPOST('filtre'))
if (GETPOST("search_ref"))
{
- $sql .= " AND fac.rowid = ".$db->escape(GETPOST("search_ref"));
+ if (is_numeric(GETPOST("search_ref"))) $sql .= " AND (fac.rowid = ".GETPOST("search_ref",'int')." OR fac.ref = '".$db->escape(GETPOST("search_ref"))."')"; // For backward compatibility
+ else $sql .= " AND fac.ref LIKE '%".$db->escape(GETPOST("search_ref"))."%'";
}
if (GETPOST("search_ref_supplier"))
{