diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php
index bf4a09c0ada..859534d53fd 100644
--- a/htdocs/admin/confexped.php
+++ b/htdocs/admin/confexped.php
@@ -87,14 +87,14 @@ else if ($action == 'disable_delivery')
$dir = DOL_DOCUMENT_ROOT."/core/modules/expedition/";
$form=new Form($db);
-llxHeader("","");
+llxHeader("",$langs->trans("SendingsSetup"));
$linkback=''.$langs->trans("BackToModuleList").'';
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
print '
';
$head = expedition_admin_prepare_head();
-dol_fiche_head($head, 'general', $langs->trans("ModuleSetup"), 0, 'sending');
+dol_fiche_head($head, 'general', $langs->trans("Sendings"), 0, 'sending');
/*
* Formulaire parametres divers
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 42741b49c7a..34a561121b2 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -215,7 +215,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
$form=new Form($db);
-llxHeader("","");
+llxHeader("",$langs->trans("SendingsSetup"));
$linkback=''.$langs->trans("BackToModuleList").'';
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 4e045ccd449..cd45378ba86 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -123,15 +123,16 @@ class Contact extends CommonObject
$sql = "SELECT count(sp.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (sp.fk_soc = s.rowid)";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
+ $sql.= " OUTER JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid";
+ $sql.= " OUTER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE sc.fk_user = " .$user->id;
$clause = "AND";
}
- $sql.= ' '.$clause.' s.entity IN ('.getEntity($this->element, 1).')';
-
+ $sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')';
+ if ($user->societe_id > 0) $sql.=" AND sp.fk_soc = ".$user->societe_id;
+
$resql=$this->db->query($sql);
if ($resql)
{
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index cdd8b89a1ad..9926ca60f69 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -4444,12 +4444,12 @@ abstract class CommonObject
}
if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0)
{
- $out .= '