diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 823a0facfb5af46597d135c0b09c95fb7325ab06..dbf7b5b5920decef697d75fd07d040dc12b0abfb 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> - * Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify @@ -178,14 +178,19 @@ class modCategorie extends DolibarrModules $this->import_fields_array[$r]=array('ca.label'=>"Label*",'ca.type'=>"Type*",'ca.description'=>"Description"); $this->import_regex_array[$r]=array('ca.type'=>'^[0|1|2|3]'); - $this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>"1",'ca.description'=>"Imported category"); + $typeexample=""; + if ($conf->product->enabled) { $typeexample.=($typeexample?"/":"")."0=Product"; } + if ($conf->fournisseur->enabled) { $typeexample.=($typeexample?"/":"")."1=Supplier"; } + if ($conf->societe->enabled) { $typeexample.=($typeexample?"/":"")."2=Customer-Prospect"; } + if ($conf->adherent->enabled) { $typeexample.=($typeexample?"/":"")."3=Member"; } + $this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>$typeexample,'ca.description'=>"Imported category"); if (! empty($conf->product->enabled)) { //Products $r++; $this->import_code[$r]=$this->rights_class.'_'.$r; - $this->import_label[$r]="CatProdList"; // Translation key + $this->import_label[$r]="CatProdLinks"; // Translation key $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('cp'=>MAIN_DB_PREFIX.'categorie_product'); @@ -204,7 +209,7 @@ class modCategorie extends DolibarrModules //Customers $r++; $this->import_code[$r]=$this->rights_class.'_'.$r; - $this->import_label[$r]="CatCusList"; // Translation key + $this->import_label[$r]="CatCusLinks"; // Translation key $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('cs'=>MAIN_DB_PREFIX.'categorie_societe'); @@ -223,7 +228,7 @@ class modCategorie extends DolibarrModules // Suppliers $r++; $this->import_code[$r]=$this->rights_class.'_'.$r; - $this->import_label[$r]="CatSupList"; // Translation key + $this->import_label[$r]="CatSupLinks"; // Translation key $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('cs'=>MAIN_DB_PREFIX.'categorie_fournisseur'); diff --git a/htdocs/install/mysql/tables/llx_categorie.sql b/htdocs/install/mysql/tables/llx_categorie.sql index 215f147b7ff0b9bc3fbf990f0d94b3032629a47a..0b6faec14aa580950a41e756228da05f66feec7a 100644 --- a/htdocs/install/mysql/tables/llx_categorie.sql +++ b/htdocs/install/mysql/tables/llx_categorie.sql @@ -24,7 +24,7 @@ create table llx_categorie entity integer DEFAULT 1 NOT NULL, -- multi company id fk_parent integer DEFAULT 0 NOT NULL, label varchar(255) NOT NULL, -- category name - type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer) + type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer, member) description text, -- description of the category fk_soc integer DEFAULT NULL, -- attribution of the category has a company (for product only) visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 1b7109b2a4444a0844e5a4450f5a2cb2e8dbc420..60267629de5802fb566c1294e5857a6ca7e0d847 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -91,4 +91,8 @@ CategId=Category id CatSupList=List of supplier categories CatCusList=List of customer/prospect categories CatProdList=List of products categories -CatMemberList=List of members categories \ No newline at end of file +CatMemberList=List of members categories +CatSupLinks=Links between suppliers and categories +CatCusLinks=Links between customers/prospects and categories +CatProdLinks=Links between products/services and categories +CatMemberLinks=Links between members and categories \ No newline at end of file diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index 828354477bfb00c04951ae3d9874a7c0408e2815..f0d0b515e80e0d74f23ef13284c6dc491c5a2441 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -91,4 +91,8 @@ CategId=Id catégorie CatSupList=Liste des catégories fournisseurs CatCusList=Liste des catégories clients/prospects CatProdList=Liste des catégories produits -CatMemberList=Liste des catégories adhérents \ No newline at end of file +CatMemberList=Liste des catégories adhérents +CatSupLinks=Liens entre les fournisseurs et les catégories +CatCusLinks=Liens entre les clients/prospects et les catégories +CatProdLinks=Liens entre les produits/services et les catégories +CatMemberLinks=Links entre les adhérents et les catégories \ No newline at end of file