diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 2ee3aca349c..7d19b61cff0 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -41,7 +41,7 @@ $diroutputpdf=$conf->facture->dir_output . '/unpayed/temp'; // Security check if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'facture',$facid,''); +$result = restrictedArea($user,'facture',$facid,''); /* @@ -186,24 +186,24 @@ if ($_GET["filtre"]) } } -if ($_GET["search_ref"]) +if ($_REQUEST["search_ref"]) { - $sql .= " AND f.facnumber like '%".$_GET["search_ref"]."%'"; + $sql .= " AND f.facnumber like '%".$_REQUEST["search_ref"]."%'"; } -if ($_GET["search_societe"]) +if ($_REQUEST["search_societe"]) { - $sql .= " AND s.nom like '%".$_GET["search_societe"]."%'"; + $sql .= " AND s.nom like '%".$_REQUEST["search_societe"]."%'"; } -if ($_GET["search_montant_ht"]) +if ($_REQUEST["search_montant_ht"]) { - $sql .= " AND f.total = '".$_GET["search_montant_ht"]."'"; + $sql .= " AND f.total = '".$_REQUEST["search_montant_ht"]."'"; } -if ($_GET["search_montant_ttc"]) +if ($_REQUEST["search_montant_ttc"]) { - $sql .= " AND f.total_ttc = '".$_GET["search_montant_ttc"]."'"; + $sql .= " AND f.total_ttc = '".$_REQUEST["search_montant_ttc"]."'"; } if (strlen($_POST["sf_ref"]) > 0) @@ -231,7 +231,17 @@ if ($result) $soc->fetch($socid); } - $param="&socid=".$socid."&option=".$option; + $param=""; + $param.=($socid?"&socid=".$socid:""); + $param.=($option?"&option=".$option:""); + if ($_REQUEST["search_ref"]) $param.='&search_ref='.urlencode($_REQUEST["search_ref"]); + if ($_REQUEST["search_societe"]) $param.='&search_societe='.urlencode($_REQUEST["search_societe"]); + if ($_REQUEST["search_montant_ht"]) $param.='&search_montant_ht='.urlencode($_REQUEST["search_montant_ht"]); + if ($_REQUEST["search_montant_ttc"]) $param.='&search_montant_ttc='.urlencode($_REQUEST["search_montant_ttc"]); + if ($_REQUEST["late"]) $param.='&late='.urlencode($_REQUEST["search_late"]); + + $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource.=eregi_replace('&','&',$param); $titre=($socid?$langs->trans("BillsCustomersUnpayedForCompany",$soc->nom):$langs->trans("BillsCustomersUnpayed")); if ($option == 'late') $titre.=' ('.$langs->trans("Late").')'; @@ -264,16 +274,16 @@ if ($result) print '
'; $db->free(); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 1571cc88b77..5a15b7d68d3 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -88,7 +88,7 @@ $titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("Payme print_fiche_titre($titre); // Formulaire de génération -print '