diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index babd8387c5b..cb966901a44 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -1662,7 +1662,7 @@ class Societe extends CommonObject
$reparray=array();
- $sql = "SELECT u.rowid, u.lastname, u.firstname, u.email";
+ $sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.statut, u.entity";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.rowid = sc.fk_user AND sc.fk_soc =".$this->id;
$sql.= " AND entity in (0, ".$conf->entity.")";
@@ -1679,6 +1679,8 @@ class Societe extends CommonObject
$reparray[$i]['lastname']=$obj->lastname;
$reparray[$i]['firstname']=$obj->firstname;
$reparray[$i]['email']=$obj->email;
+ $reparray[$i]['statut']=$obj->statut;
+ $reparray[$i]['entity']=$obj->entity;
$i++;
}
return $reparray;
diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php
index 92ce3c614ce..152f655835e 100644
--- a/htdocs/societe/commerciaux.php
+++ b/htdocs/societe/commerciaux.php
@@ -141,7 +141,7 @@ if ($socid)
print '
| '.$langs->trans("SalesRepresentatives").' | ';
print '';
- $sql = "SELECT u.rowid, u.lastname, u.firstname";
+ $sql = "SELECT u.rowid, u.login, u.fk_soc, u.lastname, u.firstname, u.statut, u.entity";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE sc.fk_soc =".$object->id;
@@ -154,6 +154,8 @@ if ($socid)
$num = $db->num_rows($resql);
$i = 0;
+ $tmpuser = new User($db);
+
while ($i < $num)
{
$obj = $db->fetch_object($resql);
@@ -165,10 +167,20 @@ if ($socid)
null; // actions in normal case
}
- print '';
+ $tmpuser->id = $obj->rowid;
+ $tmpuser->firstname = $obj->firstname;
+ $tmpuser->lastname = $obj->lastname;
+ $tmpuser->statut = $obj->statut;
+ $tmpuser->login = $obj->login;
+ $tmpuser->entity = $obj->entity;
+ $tmpuser->societe_id = $obj->fk_soc;
+ print $tmpuser->getNomUrl(1);
+
+ /*print '';
print img_object($langs->trans("ShowUser"),"user").' ';
print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n";
- print ' ';
+ print '';*/
+ print ' ';
if ($user->rights->societe->creer)
{
print 'rowid.'">';
@@ -205,7 +217,7 @@ if ($socid)
$langs->load("users");
$title=$langs->trans("ListOfUsers");
- $sql = "SELECT u.rowid, u.lastname, u.firstname, u.login";
+ $sql = "SELECT u.rowid, u.lastname, u.firstname, u.login, u.statut";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut<>0 ";
@@ -224,6 +236,7 @@ if ($socid)
print '';
print '| '.$langs->trans("Name").' | ';
print ''.$langs->trans("Login").' | ';
+ print ''.$langs->trans("Status").' | ';
print ' | ';
print " \n";
@@ -238,7 +251,9 @@ if ($socid)
print img_object($langs->trans("ShowUser"),"user").' ';
print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n";
print '';
- print ' | '.$obj->login.' | ';
+ print '';
+ print ''.$obj->login.' | ';
+ print ''.User::LibStatut($obj->statut,0).' | ';
print 'rowid.'">'.$langs->trans("Add").' | ';
print '
'."\n";
diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php
index 6ad5a81b7f2..22d99d3e9c3 100644
--- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php
+++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php
@@ -29,6 +29,7 @@
$userstatic->id=$val['id'];
$userstatic->lastname=$val['lastname'];
$userstatic->firstname=$val['firstname'];
+ $userstatic->statut=$val['statut'];
print $userstatic->getNomUrl(1);
$i++;
if ($i < $nbofsalesrepresentative) print ', ';
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 43ac20f6f56..ad72cd5f5ad 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -526,6 +526,9 @@ div.myavailability {
.selectlimit {
margin-right: 10px !important;
}
+.strikefordisabled {
+ text-decoration: line-through;
+}
/* ============================================================================== */
/* Styles to hide objects */
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 3f1246b6035..1266f5799a2 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -514,6 +514,10 @@ div.myavailability {
.selectlimit {
margin-right: 10px !important;
}
+.strikefordisabled {
+ text-decoration: line-through;
+}
+
/* ============================================================================== */
/* Styles to hide objects */
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 9266ebb4d7f..1b260f4142f 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2015,7 +2015,7 @@ class User extends CommonObject
}
if (abs($withpictoimg) != 2)
{
- if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='';
+ if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
';
if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen);
else $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen);
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
';