diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index 3251b4a1ab6..ae0469d581c 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -344,8 +344,8 @@ if ($action == 'new') $sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND b.fk_bordereau = 0"; $sql.= " AND b.amount > 0"; - if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'"; - if ($filteraccountid) $sql.=" AND ba.rowid= '".$filteraccountid."'"; + if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'"; + if ($filteraccountid > 0) $sql.=" AND ba.rowid= '".$filteraccountid."'"; $sql.= $db->order("b.dateo,b.rowid","ASC"); $resql = $db->query($sql); @@ -602,10 +602,10 @@ else print '