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 ''.$langs->trans('AliasNames').''; + print $object->name_alias; print ""; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b18ad0b4155..965727ef6e9 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -67,10 +67,10 @@ class Societe extends CommonObject var $lastname; /** - * Commercial name + * Alias names (commercial, trademark or alias names) * @var string */ - public $commercial_name; + public $name_alias; public $particulier; public $civility_id; @@ -458,8 +458,8 @@ class Societe extends CommonObject if ($result >= 0) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, commercial_name, entity, datec, fk_user_creat, canvas, status, ref_int, ref_ext, fk_stcomm, fk_incoterms, location_incoterms ,import_key)"; - $sql.= " VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->commercial_name)."', ".$conf->entity.", '".$this->db->idate($now)."'"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, name_alias, entity, datec, fk_user_creat, canvas, status, ref_int, ref_ext, fk_stcomm, fk_incoterms, location_incoterms ,import_key)"; + $sql.= " VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->name_alias)."', ".$conf->entity.", '".$this->db->idate($now)."'"; $sql.= ", ".(! empty($user->id) ? "'".$user->id."'":"null"); $sql.= ", ".(! empty($this->canvas) ? "'".$this->canvas."'":"null"); $sql.= ", ".$this->status; @@ -673,7 +673,7 @@ class Societe extends CommonObject $this->id = $id; $this->name = $this->name?trim($this->name):trim($this->nom); $this->nom = $this->name; // For backward compatibility - $this->commercial_name = trim($this->commercial_name); + $this->name_alias = trim($this->name_alias); $this->ref_ext = trim($this->ref_ext); $this->address = $this->address?trim($this->address):trim($this->address); $this->zip = $this->zip?trim($this->zip):trim($this->zip); @@ -785,7 +785,7 @@ class Societe extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; $sql .= "nom = '" . $this->db->escape($this->name) ."'"; // Required - $sql .= ",commercial_name = '" . $this->db->escape($this->commercial_name) ."'"; + $sql .= ",name_alias = '" . $this->db->escape($this->name_alias) ."'"; $sql .= ",ref_ext = " .(! empty($this->ref_ext)?"'".$this->db->escape($this->ref_ext) ."'":"null"); $sql .= ",address = '" . $this->db->escape($this->address) ."'"; @@ -1008,7 +1008,7 @@ class Societe extends CommonObject if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; - $sql = 'SELECT s.rowid, s.nom as name, s.commercial_name, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm'; + $sql = 'SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm'; $sql .= ', s.status'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_modification'; @@ -1069,7 +1069,7 @@ class Societe extends CommonObject $this->ref = $obj->rowid; $this->name = $obj->name; $this->nom = $obj->name; // deprecated - $this->commercial_name = $obj->commercial_name; + $this->name_alias = $obj->name_alias; $this->ref_ext = $obj->ref_ext; $this->ref_int = $obj->ref_int; @@ -1792,8 +1792,8 @@ class Societe extends CommonObject $name =$code.' '.$name; } - if (!empty($this->commercial_name)) { - $name .= ' ('.$this->commercial_name.')'; + if (!empty($this->name_alias)) { + $name .= ' ('.$this->name_alias.')'; } $result=''; $label=''; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 45e2ac64b67..18cc214246d 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -120,9 +120,9 @@ print ''; print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); print ''; -// Commercial name -print ''; -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 ''.$langs->trans('AliasNames').''; + print $object->name_alias; print ""; // Prefix diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 47ceee41854..271c69872ce 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -82,9 +82,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 ""; 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 ''.$langs->trans('AliasNames').''; + print $object->name_alias; print ""; // Prefix diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index ac1f25f4dab..6f1f4e1a42c 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -137,9 +137,9 @@ print '' . $langs->trans("ThirdPartyName") . 'showrefnav($soc, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom'); 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/societe/soc.php b/htdocs/societe/soc.php index aa241fc5e27..cc1af52b2dd 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -251,7 +251,7 @@ if (empty($reshook)) else { $object->name = GETPOST('name', 'alpha'); - $object->commercial_name = GETPOST('commercial_name'); + $object->name_alias = GETPOST('name_alias'); } $object->address = GETPOST('address', 'alpha'); @@ -917,7 +917,7 @@ else $("#radiocompany").click(function() { $(".individualline").hide(); $("#typent_id").val(0); - $("#commercial_name").show(); + $("#name_alias").show(); $("#effectif_id").val(0); $("#TypeName").html(document.formsoc.ThirdPartyName.value); document.formsoc.private.value=0; @@ -925,7 +925,7 @@ else $("#radioprivate").click(function() { $(".individualline").show(); $("#typent_id").val(id_te_private); - $("#commercial_name").hide(); + $("#name_alias").hide(); $("#effectif_id").val(id_ef15); $("#TypeName").html(document.formsoc.LastName.value); document.formsoc.private.value=1; @@ -1057,9 +1057,9 @@ else print ''; } - // Commercial name - print ''; - 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 ''.$langs->trans('AliasNames').''; + print $object->name_alias; print ""; // Logo+barcode diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 14f5ca6557c..4e539c4236c 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -92,7 +92,7 @@ if ($mode == 'search') 's.email', 's.url', 's.siren', - 's.commercial_name' + 's.name_alias' ); if (!empty($conf->barcode->enabled)) { diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index be8b493d87d..928424b1d8b 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -154,9 +154,9 @@ if ($id > 0 || ! empty($ref)) print $form->showrefnav($object,'id','',($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/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 71b6bab0a2c..4654ec0ba88 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -124,7 +124,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $conf->global->THEME_ELDY_BACKTABCARD1='255,255,255'; $conf->global->THEME_ELDY_BACKTABCARD2='210,210,210'; // card $conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234'; - $conf->global->THEME_ELDY_BACKBODY='243,243,243;'; + $conf->global->THEME_ELDY_BACKBODY='243,243,243'; $conf->global->THEME_ELDY_LINEIMPAIR1='255,255,255'; $conf->global->THEME_ELDY_LINEIMPAIR2='255,255,255'; $conf->global->THEME_ELDY_LINEIMPAIRHOVER='238,246,252'; @@ -1114,6 +1114,11 @@ div.blockvmenusearch box-shadow: 3px 3px 4px #DDD; } +div.blockvmenusearch > form > div { + /* min-height: 40px; */ + padding-top: 3px; +} + div.blockvmenuhelp { dol_optimize_smallscreen)) { ?>