diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index 2e96a5451d4..64ac19fe1ad 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -334,7 +334,7 @@ if ($resql)
print '';
print '
';
- if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_valid),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
+ if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_commande),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
print img_picto($langs->trans("Late"),"warning");
if(!empty($objp->note_private))
{
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 1c735d787b4..234dff307a6 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -172,11 +172,11 @@ if (strlen($search_phone))
}
if (strlen($search_phoneper))
{
- $sql .= " AND p.phone LIKE '%".$db->escape($search_phoneper)."%'";
+ $sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phoneper)."%'";
}
if (strlen($search_phonepro))
{
- $sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phonepro)."%'";
+ $sql .= " AND p.phone LIKE '%".$db->escape($search_phonepro)."%'";
}
if (strlen($search_phonemob))
{
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 6f8c3bc1920..0a15fa1bdae 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -399,7 +399,7 @@ if (empty($action))
{
$sql .= ' AND p.rowid='.$db->escape($search_ref);
}
- if (! empty($search_account))
+ if (! empty($search_account) && $search_account > 0)
{
$sql .= ' AND b.fk_account='.$db->escape($search_account);
}
|