';
+ print '';
print '';
}
diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index 21cf1ad4cc9..c36e9be33c1 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -222,7 +222,7 @@ if ($socid)
if ($conf->global->MAIN_MODULE_BARCODE)
{
- print '
'.$langs->trans('Gencod').'
'.$soc->gencod.'
';
+ print '
'.$langs->trans('Gencod').'
'.$soc->barcode.'
';
}
// Address
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 0a8ae2d18ff..ed49e784dad 100755
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -89,7 +89,7 @@ abstract class CommonDocGenerator
'mycompany_web'=>$mysoc->url,
'mycompany_juridicalstatus'=>$mysoc->forme_juridique,
'mycompany_capital'=>$mysoc->capital,
- 'mycompany_barcode'=>$mysoc->gencod,
+ 'mycompany_barcode'=>$mysoc->barcode,
'mycompany_idprof1'=>$mysoc->idprof1,
'mycompany_idprof2'=>$mysoc->idprof2,
'mycompany_idprof3'=>$mysoc->idprof3,
@@ -121,7 +121,7 @@ abstract class CommonDocGenerator
'company_country_code'=>$object->country_code,
'company_country'=>$outputlangs->transnoentitiesnoconv("Country".$object->country_code),
'company_web'=>$object->url,
- 'company_barcode'=>$object->gencod,
+ 'company_barcode'=>$object->barcode,
'company_vatnumber'=>$object->tva_intra,
'company_customercode'=>$object->code_client,
'company_suppliercode'=>$object->code_fournisseur,
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index 43946280014..14b6df6195f 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -268,11 +268,11 @@ class modSociete extends DolibarrModules
$this->import_label[$r]='ImportDataset_company_1';
$this->import_icon[$r]='company';
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe'); // List of tables to insert into (insert done in same order)
- $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.datec'=>"DateCreation",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Effectif","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.gencod'=>'BarCode');
+ $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.datec'=>"DateCreation",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Effectif","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode');
$this->import_entities_array[$r]=array(); // We define here only fields that use another picto
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]');
//$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.fk_typent'=>array('rule'=>'fetchidfromcode','file'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch')));
- $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(mktime(),'YYYY-MM-DD'),'s.code_client'=>"CU01-0001",'s.code_fournisseur'=>"SU01-0001",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'','s.default_lang'=>'en_US','s.gencod'=>'123456789');
+ $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(mktime(),'YYYY-MM-DD'),'s.code_client'=>"CU01-0001",'s.code_fournisseur'=>"SU01-0001",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'','s.default_lang'=>'en_US','s.barcode'=>'123456789');
// Import list of contact and attributes
/* $r++;
diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql
index a4b7fe38f94..50432e0f64d 100755
--- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql
+++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql
@@ -103,3 +103,6 @@ ALTER TABLE llx_facture MODIFY ref_client varchar(255);
UPDATE llx_societe SET fk_stcomm = 0 WHERE fk_stcomm IS NULL;
ALTER TABLE llx_societe MODIFY COLUMN fk_stcomm integer NOT NULL;
+ALTER TABLE llx_societe CHANGE COLUMN gencod barcode varchar(255);
+ALTER TABLE llx_societe ADD COLUMN fk_barcode_type integer DEFAULT 0;
+
diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql
index c0dd6594457..84f0e32360c 100644
--- a/htdocs/install/mysql/tables/llx_societe.sql
+++ b/htdocs/install/mysql/tables/llx_societe.sql
@@ -80,7 +80,7 @@ create table llx_societe
tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA
localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1
localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2
- gencod varchar(255), -- barcode
+ barcode varchar(255), -- barcode
price_level integer NULL, -- level of price for multiprices
default_lang varchar(6), -- default language
logo varchar(255),
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index f4717cc264c..c0f90fc6c58 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -107,7 +107,7 @@ if ($_GET["socid"])
if ($conf->global->MAIN_MODULE_BARCODE)
{
- print '