diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index c4110ce0295..dc241cdd4d3 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -557,7 +557,7 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
- if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
+ if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['lower_planned_end_date']['checked'])) print_liste_field_titre($arrayfields['lower_planned_end_date']['label'],$_SERVER["PHP_SELF"],"lower_planned_end_date","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['status']['checked']))
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 37aaf0fc13b..c510c29a101 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -4505,8 +4505,10 @@ abstract class CommonObject
//Eliminate copied source object extra_fields that do not exist in target object
$new_array_options=array();
foreach ($this->array_options as $key => $value) {
- if (in_array(substr($key,8), array_keys($target_extrafields))) // We remove the 'options_' from $key
+ if (in_array(substr($key,8), array_keys($target_extrafields))) // We remove the 'options_' from $key for test
$new_array_options[$key] = $value;
+ elseif (in_array($key, array_keys($target_extrafields))) // We test on $key that does not contains the 'options_' prefix
+ $new_array_options['options_'.$key] = $value;
}
foreach($new_array_options as $key => $value)
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 836c73d7e90..e5c548d40a7 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -2474,8 +2474,6 @@ else
$genallowed=$user->rights->societe->lire;
$delallowed=$user->rights->societe->creer;
- $var=true;
-
print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 0, 0, 0, 28, 0, 'entity='.$object->entity, 0, '', $object->default_lang);
}
diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php
index 3ec07697ec7..935dfa17dc3 100644
--- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php
+++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php
@@ -1,5 +1,22 @@
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see
| ';
print $langs->trans('SalesRepresentatives');
@@ -14,13 +31,7 @@
$listsalesrepresentatives=$object->getSalesRepresentatives($user);
$nbofsalesrepresentative=count($listsalesrepresentatives);
- if ($nbofsalesrepresentative > 3) // We print only number
- {
- print '';
- print $nbofsalesrepresentative;
- print '';
- }
- else if ($nbofsalesrepresentative > 0)
+ if ($nbofsalesrepresentative > 0)
{
$userstatic=new User($db);
$i=0;
@@ -36,7 +47,26 @@
$userstatic->entity=$val['entity'];
print $userstatic->getNomUrl(-1);
$i++;
- if ($i < $nbofsalesrepresentative) print ', ';
+ if ($i < $nbofsalesrepresentative)
+ {
+ print ' ';
+ if ($i >= 3) // We print only number
+ {
+ $userstatic->id=0;
+ $userstatic->login='';
+ $userstatic->lastname='';
+ $userstatic->firstname='';
+ $userstatic->statut=0;
+ $userstatic->photo='';
+ $userstatic->email='';
+ $userstatic->entity=0;
+ print '';
+ print $userstatic->getNomUrl(-1, 'nolink', 0, 1);
+ print '+'.($nbofsalesrepresentative - $i);
+ print '';
+ break;
+ }
+ }
}
}
else print ''.$langs->trans("NoSalesRepresentativeAffected").'';
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 1c6e8f98bf5..c8a9a141aeb 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2055,7 +2055,7 @@ class User extends CommonObject
* Use this->id,this->lastname, this->firstname
*
* @param int $withpictoimg Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small)
- * @param string $option On what the link point to
+ * @param string $option On what the link point to ('leave', 'nolink', )
* @param integer $infologin Add complete info tooltip
* @param integer $notooltip 1=Disable tooltip on picto and name
* @param int $maxlen Max length of visible user name
@@ -2095,7 +2095,7 @@ class User extends CommonObject
{
$thirdpartystatic = new Societe($db);
$thirdpartystatic->fetch($this->societe_id);
- if (empty($hidethirdpartylogo)) $companylink = ' '.$thirdpartystatic->getNomUrl(2); // picto only of company
+ if (empty($hidethirdpartylogo)) $companylink = ' '.$thirdpartystatic->getNomUrl(2, (($option == 'nolink')?'nolink':'')); // picto only of company
$company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
}
$type=($this->societe_id?$langs->trans("External").$company:$langs->trans("Internal"));
@@ -2161,7 +2161,7 @@ class User extends CommonObject
$linkend='';
//if ($withpictoimg == -1) $result.=' ';
- $result.=$linkstart;
+ $result.=(($option == 'nolink')?'':$linkstart);
if ($withpictoimg)
{
$paddafterimage='';
@@ -2179,7 +2179,7 @@ class User extends CommonObject
else $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen);
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.=' ';
}
- $result.=$linkend;
+ $result.=(($option == 'nolink')?'':$linkend);
//if ($withpictoimg == -1) $result.='';
$result.=$companylink;
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 96c9e6b89d0..1b7be0b0a17 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -492,9 +492,9 @@ else
print '';
// List of actions on element
- include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
+ /*include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
- $somethingshown = $formactions->showactions($object, 'usergroup', $socid, 1);
+ $somethingshown = $formactions->showactions($object, 'usergroup', $socid, 1);*/
print ' |