From 1bc25319e9a5902d0ef781ead7544bcbf73e2d48 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 3 Sep 2003 14:00:35 +0000 Subject: [PATCH] Ajout recherche de facture --- htdocs/compta/facture.php3 | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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);