diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index 012ba35354a..083edbf6b7e 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -252,9 +252,9 @@ if ($socid)
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type);
print '';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $soc->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
'.$langs->trans('AliasNames').'
';
+ print $soc->name_alias;
print "
";
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 4d32c13b08f..8058eaff9f8 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -227,9 +227,9 @@ if ($id > 0)
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
'.$langs->trans('AliasNames').'
';
+ print $object->name_alias;
print "
";
// Prospect/Customer
diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php
index 92b954e98e1..a82413e9d4f 100644
--- a/htdocs/comm/list.php
+++ b/htdocs/comm/list.php
@@ -103,7 +103,7 @@ $thirdpartystatic=new Societe($db);
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$langs->trans("ThirdParty"),$help_url);
-$sql = "SELECT s.rowid, s.nom as name, s.commercial_name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
+$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
$sql.= " s.datec, s.canvas";
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
@@ -124,7 +124,7 @@ if ($search_company) {
$sql .= natural_search(
array(
's.nom',
- 's.commercial_name'
+ 's.name_alias'
),
$search_company
);
@@ -263,7 +263,7 @@ if ($result)
$thirdpartystatic->code_client=$obj->code_client;
$thirdpartystatic->canvas=$obj->canvas;
$thirdpartystatic->status=$obj->status;
- $thirdpartystatic->commercial_name=$obj->commercial_name;
+ $thirdpartystatic->name_alias=$obj->name_alias;
print $thirdpartystatic->getNomUrl(1);
print '';
print '
'.$obj->zip.'
';
diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php
index 6380742f440..68299c9a781 100644
--- a/htdocs/comm/prospect/list.php
+++ b/htdocs/comm/prospect/list.php
@@ -209,7 +209,7 @@ $prospectstatic=new Client($db);
$prospectstatic->client=2;
$prospectstatic->loadCacheOfProspStatus();
-$sql = "SELECT s.rowid as socid, s.nom as name, s.commercial_name, s.zip, s.town, s.datec, s.status as status, s.code_client, s.client,";
+$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.datec, s.status as status, s.code_client, s.client,";
$sql.= " s.prefix_comm, s.fk_prospectlevel, s.fk_stcomm as stcomm_id,";
$sql.= " st.libelle as stcomm_label,";
$sql.= " d.nom as departement";
@@ -233,7 +233,7 @@ if ($search_nom) {
$sql .= natural_search(
array(
's.nom',
- 's.commercial_name'
+ 's.name_alias'
),
$search_nom
);
@@ -436,7 +436,7 @@ if ($resql)
$prospectstatic->code_client=$obj->code_client;
$prospectstatic->client=$obj->client;
$prospectstatic->fk_prospectlevel=$obj->fk_prospectlevel;
- $prospectstatic->commercial_name=$obj->commercial_name;
+ $prospectstatic->name_alias=$obj->name_alias;
print $prospectstatic->getNomUrl(1,'prospect');
print '';
print "
".$obj->zip."
";
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 1d5858fa746..5cc60cb8bd4 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -149,7 +149,7 @@ abstract class CommonDocGenerator
$array_thirdparty = array(
'company_name'=>$object->name,
- 'company_commercial_name' => $object->commercial_name,
+ 'company_name_alias' => $object->name_alias,
'company_email'=>$object->email,
'company_phone'=>$object->phone,
'company_fax'=>$object->fax,
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 08348e6517d..5ca77722dd4 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -304,8 +304,8 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs)
// On peut utiliser le nom de la societe du contact
if ($thirdparty instanceof Societe) {
- if (!empty($thirdparty->commercial_name)) {
- $socname = $thirdparty->commercial_name."\n";
+ if (!empty($thirdparty->name_alias)) {
+ $socname = $thirdparty->name_alias."\n";
}
$socname .= $thirdparty->name;
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 0d9230d55fe..121c5ba84ca 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -138,9 +138,9 @@ if ($object->id > 0)
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
'.$langs->trans('AliasNames').'
';
+ print $object->name_alias;
print "
";
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php
index 30b649a0780..f5f4d4dc897 100644
--- a/htdocs/fourn/list.php
+++ b/htdocs/fourn/list.php
@@ -98,7 +98,7 @@ $thirdpartystatic=new Societe($db);
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$langs->trans("ThirdParty"),$help_url);
-$sql = "SELECT s.rowid as socid, s.nom as name, s.commercial_name, s.zip, s.town, s.datec, st.libelle as stcomm, s.prefix_comm, s.status as status, ";
+$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.datec, st.libelle as stcomm, s.prefix_comm, s.status as status, ";
$sql.= "code_fournisseur, code_compta_fournisseur";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
// Add fields for extrafields
@@ -125,7 +125,7 @@ if ($search_name) {
$sql .= natural_search(
array(
's.nom',
- 's.commercial_name'
+ 's.name_alias'
),
$search_name
);
@@ -243,7 +243,7 @@ if ($resql)
$thirdpartystatic->id=$obj->socid;
$thirdpartystatic->name=$obj->name;
$thirdpartystatic->status=$obj->status;
- $thirdpartystatic->commercial_name=$obj->commercial_name;
+ $thirdpartystatic->name_alias=$obj->name_alias;
print "
";
print '
';
diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
index cdb0f2eac01..309622a170d 100755
--- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
@@ -287,8 +287,8 @@ ALTER TABLE llx_expensereport_det MODIFY COLUMN fk_c_tva integer NULL;
ALTER TABLE llx_projet ADD COLUMN budget_amount double(24,8);
--- Commercial name
-ALTER TABLE llx_societe ADD COLUMN commercial_name varchar(128) NULL;
+-- Alias names (commercial, trademark or alias names)
+ALTER TABLE llx_societe ADD COLUMN name_alias varchar(128) NULL;
create table llx_commande_fournisseurdet_extrafields
(
diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql
index 61af3997020..4dc1b3fe750 100644
--- a/htdocs/install/mysql/tables/llx_societe.sql
+++ b/htdocs/install/mysql/tables/llx_societe.sql
@@ -25,7 +25,7 @@ create table llx_societe
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
nom varchar(128), -- company reference name (should be same length than adherent.societe)
- commercial_name varchar(128) NULL,
+ name_alias varchar(128) NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index a0626c1087f..a95eb99012d 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -30,6 +30,7 @@ ThirdPartyContact=Third party contact/address
StatusContactValidated=Status of contact/address
Company=Company
CompanyName=Company name
+AliasNames=Alias names (commercial, trademark, ...)
Companies=Companies
CountryIsInEEC=Country is inside European Economic Community
ThirdPartyName=Third party name
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index db71ff72ff2..31ddda84933 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -86,9 +86,9 @@ if ($socid)
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
print '
';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
';
+// Alias names (commercial, trademark or alias names)
+print '
';
+print '
';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 53549b04734..a4ca499ab5a 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -118,9 +118,9 @@ if ($object->id)
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
print '';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
'.$langs->trans('AliasNames').'
';
+ print $object->name_alias;
print "
";
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php
index c2711e5edd8..357947134f2 100644
--- a/htdocs/societe/notify/card.php
+++ b/htdocs/societe/notify/card.php
@@ -149,9 +149,9 @@ if ($result > 0)
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
print '';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '
';
+ // Alias names (commercial, trademark or alias names)
+ print '
';
+ print '
';
// Address
print '
'.fieldLabel('Address','address').'
';
@@ -1475,9 +1475,9 @@ else
print '
'.fieldLabel('ThirdPartyName','name',1).'
';
print '
';
- // Commercial name
- print '
';
- print '
';
+ // Alias names (commercial, trademark or alias names)
+ print '
';
+ print '
';
// Prefix
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
@@ -1892,9 +1892,9 @@ else
print '';
print '';
- // Commercial name
- print '
'.$langs->trans('CommercialName').'
';
- print $object->commercial_name;
+ // Alias names (commercial, trademark or alias names)
+ print '