diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index 5e2b223df85..69b445d700c 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -206,7 +206,10 @@ if ($_GET["socid"])
print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print '';
- print '
| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
+ }
if ($soc->client)
{
@@ -424,7 +427,7 @@ function formCategory($db,$object,$typeid)
print '';
print '";
diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php
index fb06e37a7b9..b28576c3f37 100644
--- a/htdocs/comm/recap-client.php
+++ b/htdocs/comm/recap-client.php
@@ -69,9 +69,12 @@ if ($socid > 0)
print '| '.$langs->trans("Name").' | '.$societe->nom.' |
';
// Prefix
- print '| '.$langs->trans("Prefix").' | ';
- print ($societe->prefix_comm?$societe->prefix_comm:' ');
- print ' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans("Prefix").' | ';
+ print ($societe->prefix_comm?$societe->prefix_comm:' ');
+ print ' |
';
+ }
print "";
diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php
index d877e37b702..86d7eefaefb 100644
--- a/htdocs/compta/recap-compta.php
+++ b/htdocs/compta/recap-compta.php
@@ -68,9 +68,12 @@ if ($socid > 0)
print '| '.$langs->trans("Name").' | '.$societe->nom.' |
';
// Prefix
- print '| '.$langs->trans("Prefix").' | ';
- print ($societe->prefix_comm?$societe->prefix_comm:' ');
- print ' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans("Prefix").' | ';
+ print ($societe->prefix_comm?$societe->prefix_comm:' ');
+ print ' |
';
+ }
print "";
diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php
index 5fe712e7c7a..3596f4e2436 100644
--- a/htdocs/fourn/fiche.php
+++ b/htdocs/fourn/fiche.php
@@ -95,7 +95,10 @@ if ( $societe->fetch($socid) )
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '';
- print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' |
';
+ }
if ($societe->fournisseur)
{
diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php
index 506dab6307c..4d67ec05aeb 100644
--- a/htdocs/fourn/recap-fourn.php
+++ b/htdocs/fourn/recap-fourn.php
@@ -69,9 +69,12 @@ if ($socid > 0)
print '| '.$langs->trans("Name").' | '.$societe->nom.' |
';
// Prefix
- print '| '.$langs->trans("Prefix").' | ';
- print ($societe->prefix_comm?$societe->prefix_comm:' ');
- print ' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans("Prefix").' | ';
+ print ($societe->prefix_comm?$societe->prefix_comm:' ');
+ print ' |
';
+ }
print "";
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index c2a964c5ebe..1db0283d895 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -84,7 +84,10 @@ if ($_GET["socid"])
print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print '';
- print '| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
+ }
if ($soc->client)
{
diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php
index 7acc91fbe76..2dff996b236 100644
--- a/htdocs/societe/commerciaux.php
+++ b/htdocs/societe/commerciaux.php
@@ -109,7 +109,15 @@ if ($_GET["socid"])
print $langs->trans('CustomerCode').'';
print $soc->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
- print ' | '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' | ';
+ print '';
+
+ // Prefix
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print ''.$langs->trans('Prefix').' | '.$soc->prefix_comm.' | ';
+ }
+ else print ' | ';
+ print '';
print "| ".$langs->trans('Address')." | ".nl2br($soc->address)." |
";
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index d7a8f282270..4e9fc863558 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -147,7 +147,10 @@ if ($socid > 0)
print '';
// Prefix
- print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' |
';
+ }
if ($societe->client)
{
diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php
index 747cd18d5ac..8a4e12239e0 100644
--- a/htdocs/societe/lien.php
+++ b/htdocs/societe/lien.php
@@ -112,7 +112,15 @@ if($_GET["socid"])
print $langs->trans('CustomerCode').'';
print $soc->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
- print ' | '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' | ';
+ print '';
+
+
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print ''.$langs->trans('Prefix').' | '.$soc->prefix_comm.' | ';
+ }
+ else print ' | ';
+ print '';
print "| ".$langs->trans('Address')." | ".nl2br($soc->address)." |
";
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index d3f675ce609..00ba088e0db 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -666,12 +666,22 @@ else
if ($soc->particulier)
{
print '| '.$langs->trans('LastName').' | | ';
- print ''.$langs->trans('Prefix').' | |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print ''.$langs->trans('Prefix').' | | ';
+ }
+ else print ' | ';
+ print '';
}
else
{
print '| '.$langs->trans('Name').' | | ';
- print ''.$langs->trans('Prefix').' | |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print ''.$langs->trans('Prefix').' | | ';
+ }
+ else print ' | ';
+ print '';
}
// If javascript on, we show option individual
if ($conf->use_javascript_ajax)
@@ -1057,18 +1067,21 @@ else
print '| '.$langs->trans('Name').' | |
';
// Prefix
- print '| '.$langs->trans("Prefix").' | ';
- // It does not change the prefix mode using the auto numbering prefix
- if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm)
- {
- print '';
- print $soc->prefix_comm;
- }
- else
- {
- print '';
- }
- print ' | ';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '
| '.$langs->trans("Prefix").' | ';
+ // It does not change the prefix mode using the auto numbering prefix
+ if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm)
+ {
+ print '';
+ print $soc->prefix_comm;
+ }
+ else
+ {
+ print '';
+ }
+ print ' | ';
+ }
// Prospect/Customer
print '
| '.$langs->trans('ProspectCustomer').' | |
';
- print '| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans('Prefix').' | '.$soc->prefix_comm.' |
';
+ }
if ($soc->client)
{
diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php
index 679b4dd6472..20c07917bd6 100644
--- a/htdocs/societe/socnote.php
+++ b/htdocs/societe/socnote.php
@@ -85,7 +85,10 @@ if ($socid > 0)
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
print '';
- print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' |
';
+ if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
+ {
+ print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' |
';
+ }
if ($societe->client)
{