';
diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index 362da157b9a..5ce833e5e3f 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -67,7 +67,7 @@ $sql = "SELECT e.rowid, e.ref";
$sql.= ", s.nom, s.rowid as socid";
$sql.= ", c.ref as commande_ref, c.rowid as commande_id";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
-$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target";
+$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping'";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
if (!$user->rights->societe->client->voir && !$socid)
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index 13f890c6013..a0523bcbc28 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -1880,19 +1880,23 @@ else
print "\n";
// Accountancy code
- print "
";
- print '
'.$langs->trans("AccountancyCode").'
';
- print '
';
- if ($caneditfield)
+ if (! empty($conf->global->USER_ENABLE_ACCOUNTANCY_CODE)) // For the moment field is not used so must not appeared.
{
- print '';
+ print "