diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index d4bd54daedc..a2d0f77a94f 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -122,6 +122,31 @@ if ($_GET["filtre"]) } } +if ($_GET["search_ref"]) + { + $sql .= " AND fac.facnumber like '%".$_GET["search_ref"]."%'"; + } + +if ($_GET["search_libelle"]) + { + $sql .= " AND fac.libelle like '%".$_GET["search_libelle"]."%'"; + } + +if ($_GET["search_societe"]) + { + $sql .= " AND s.nom like '%".$_GET["search_societe"]."%'"; + } + +if ($_GET["search_montant_ht"]) + { + $sql .= " AND fac.total_ht = '".$_GET["search_montant_ht"]."'"; + } + +if ($_GET["search_montant_ttc"]) + { + $sql .= " AND fac.total_ttc = '".$_GET["search_montant_ttc"]."'"; + } + $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit+1, $offset); $result = $db->query($sql); @@ -148,7 +173,29 @@ if ($result) print_liste_field_titre($langs->trans("AmountTTC"),"index.php","fac.total_ttc","&socid=$socid","",'align="right"',$sortfield); print_liste_field_titre($langs->trans("Status"),"index.php","fk_statut,paye","&socid=$socid","",'align="center"',$sortfield); print "\n"; - $var=True; + + // Lignes des champs de filtre + print '
'; + + $var=True; while ($i < min($num,$limit)) { $obj = $db->fetch_object();