diff --git a/htdocs/compta/facture.php3 b/htdocs/compta/facture.php3 index 7eb74795753..ae9367a2e84 100644 --- a/htdocs/compta/facture.php3 +++ b/htdocs/compta/facture.php3 @@ -278,13 +278,13 @@ if ($action == 'pdf') $html = new Form($db); -/* +/********************************************************************* * * Mode creation * * * - */ + ************************************************************************/ if ($action == 'create') { print_titre("Emettre une facture"); @@ -959,12 +959,12 @@ else print "Facture inexistante ou accés refusé"; } } else { - /* - * - * Mode Liste - * - * - */ + /*************************************************************************** + * * + * Mode Liste * + * * + * * + ***************************************************************************/ if ($page == -1) { $page = 0 ; @@ -1002,6 +1002,12 @@ else if ($year > 0) $sql .= " AND date_format(f.datef, '%Y') = $year"; + + if (strlen($HTTP_POST_VARS["sf_ref"]) > 0) + { + $sql .= " AND f.facnumber like '%".$HTTP_POST_VARS["sf_ref"] . "%'"; + } + $sql .= " ORDER BY $sortfield $sortorder, rowid DESC "; $sql .= $db->plimit($limit + 1,$offset);