diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index 273b3e1483e..135297643b1 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -43,14 +43,14 @@ function societe_prepare_head($objsoc) $head[$h][2] = 'company'; $h++; - if ($objsoc->client==1) + if ($objsoc->client==1 || $objsoc->client==3) { $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objsoc->id; $head[$h][1] = $langs->trans("Customer");; $head[$h][2] = 'customer'; $h++; } - if ($objsoc->client==2) + if ($objsoc->client==2 || $objsoc->client==3) { $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objsoc->id; $head[$h][1] = $langs->trans("Prospect"); diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 322a2eb2815..a1f62ec2c4d 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -345,10 +345,7 @@ function dol_fiche_head($links, $active='0', $title='', $notab=0, $picto='') $limittitle=30; print ''; if ($picto) print img_object('',$picto).' '; - print - ((!defined('MAIN_USE_SHORT_TITLE')) || (defined('MAIN_USE_SHORT_TITLE') && MAIN_USE_SHORT_TITLE)) - ? dol_trunc($title,$limittitle) - : $title; + print dol_trunc($title,$limittitle); print ''; } @@ -990,14 +987,14 @@ function dolibarr_trunc($string,$size=40,$trunc='right',$stringencoding='') * \param trunc Where to trunc: right, left, middle * \param stringencoding Tell what is source string encoding * \return string Truncated string - * \remarks USE_SHORT_TITLE=0 can disable all truncings + * \remarks MAIN_DISABLE_TRUNC=1 can disable all truncings */ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='') { global $conf; if ($size==0) return $string; - if (! defined('USE_SHORT_TITLE') || USE_SHORT_TITLE) + if (empty($conf->global->MAIN_DISABLE_TRUNC)) { // We go always here if ($trunc == 'right') diff --git a/htdocs/soc.php b/htdocs/soc.php index c0ba8d5c581..3cd9399ad8f 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -308,9 +308,10 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') /* * Fiche societe en mode creation */ - if ($_GET["type"]=='f') { $soc->fournisseur=1; } - if ($_GET["type"]=='c') { $soc->client=1; } - if ($_GET["type"]=='p') { $soc->client=2; } + if ($_GET["type"]=='f') { $soc->fournisseur=1; } + if ($_GET["type"]=='c') { $soc->client=1; } + if ($_GET["type"]=='p') { $soc->client=2; } + if ($_GET["type"]=='cp') { $soc->client=3; } if ($_REQUEST["private"]==1) { $soc->particulier=1; } $soc->nom=$_POST["nom"]; @@ -407,9 +408,10 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') print ''.$langs->trans('Prefix').''; } - // Client / Prospect + // Prospect/Customer print ''.$langs->trans('ProspectCustomer').''; @@ -719,8 +721,10 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''; + // Name print ''; + // Prefix print ''; - // Client / Prospect + // Prospect/Customer print '';
'.$langs->trans('Name').'
'.$langs->trans("Prefix").''; // On ne permet pas la modification du prefix en mode de numerotation auto utilisant le prefix if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm) @@ -734,9 +738,10 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') } print '
'.$langs->trans('ProspectCustomer').'