diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index dc4c56189e1..6a2749b628e 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -62,7 +62,7 @@ if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."commande as c"; if ($socidp) $sql.=", ".MAIN_DB_PREFIX."commande as c"; -$sql_add = " WHERE "; +$sql_add = " WHERE c.fk_soc = s.rowid"; if ($socidp) { $sql.= $sql_add . " e.fk_commande = c.rowid AND c.fk_soc = ".$socidp; @@ -109,7 +109,7 @@ if ($resql) print ""; print "rowid\">".img_object($langs->trans("ShowSending"),"sending").' '; print "rowid\">".$objp->ref."\n"; - print "fk_soc\">".$objp->nom."\n"; + print ''.$objp->nom.''"\n"; $now = time(); $lim = 3600 * 24 * 15 ;